Ejecuta tus programas .jar en Linux con esta guía rápida / Run your .jar programs on Linux with this quick guide

@derppunk · 2024-04-10 01:03 · Geek Zone

Una de las primeras cosas que hice al migrar a Linux fue buscar jugar uno de mis juegos favoritos. Pensé que sería fácil de abrir ya que es un juego basado en Java y el formato es **.jar.** Sin embargo, cuando descargué el archivo y me dispuse a abrirlo, me encontré con que se abría como un archivo comprimido y no como un ejecutable, por suerte este problema es fácil de solucionar. >One of the first things I did when migrating to Linux was look into playing one of my favorite games. I thought it would be easy to open since it is a Java based game and the format is **.jar.** However, when I downloaded the file and went to open it, I found that it opened as a compressed file and did not as an executable, luckily this problem is easy to solve. ![](https://images.ecency.com/DQmXaXnZLCipXFdaHa8PbR4ExFnRufB91uRoHxpMQyDtsHJ/1.jpg) ![](https://images.ecency.com/DQmTubUcEvHZ5uRHcDeyCyLcgq7vSRh3ghDUeYKuRuGZWJL/2.jpg) Si has tenido este problema al intentar abrir un archivo.jar sigue estos pasos: >If you have had this problem when trying to open a .jar file, follow these steps: 1️⃣ **Actualizar las dependencias del sistema:** Lo primero que tenemos que hacer es abrir el terminal y escribir el siguiente comando: >1️⃣ **Update system dependencies:** The first thing we have to do is open the terminal and write the following command: **sudo apt update** Con ello se actualizarán todas las dependencias del sistema, este paso es muy importante si acabas de migrar a Linux y el sistema está recién instalado. >This will update all system dependencies. This step is very important if you have just migrated to Linux and the system is newly installed. ![](https://images.ecency.com/DQmYYcQxBRL4oicN2kUuMa8WvTETVDRt8zdirY3xX6HJCcb/3.jpg) ![](https://images.ecency.com/DQmcFifzNjHenLhwUxs6N9AYEeKikR4sJB8QhqtkdXNRHTY/4.jpg) ![](https://images.ecency.com/DQmbYzaxKK9nwX56BZGt9sduiLtwVNKhfjQUVDGXt5Msif4/5.jpg) ![](https://images.ecency.com/DQmV6dN2tuPEJwoUCtZEkjQzVxLk3tNQZ5H3CTxzT6UfKSQ/6.jpg) ![](https://images.ecency.com/DQmRcGJj9D7tihKSs7UvkuoYnBMKGJGka96Te6hvekp7G7h/7.jpg) 2️⃣ **Instalar Java (si no está instalado):** Por lo general los sistemas más actuales basados en linux incluyen Java pero si no es ese nuestro caso solo basta con escribir el siguiente comando en el terminal: > 2️⃣ **Install Java (if it is not installed):** Generally the most current systems based on Linux include Java but if that is not our case, just write the following command in the terminal: **sudo apt install default-jre**
![](https://images.ecency.com/DQmWY9vcGuFpA2QhhxkiUyuh8xdxUWq4CQt1DKC6Xj6ao2m/8.jpg)
![](https://images.ecency.com/DQmdxLsUzDN4Fbh7Fni5x6UN3r61AQsv8JchA9LkDtjyuwk/9.jpg)
![](https://images.ecency.com/DQmecbTy6Wy4KzWq7LmuXNWvehozx3GH3pY1ktAT8ZNaHaQ/10.jpg) 3️⃣ **Otorga permisos de ejecución al archivo .jar:** En caso de tener las dependencias actualizadas y el Java instalado podemos hacer el siguiente paso y solucionar el problema de una vez por todas. • Haz clic derecho en el archivo .jar y selecciona "Propiedades". > 3️⃣ **Grant execution permissions to the .jar file:** If we have the dependencies updated and Java installed, we can do the next step and solve the problem once and for all. > • Right click on the .jar file and select “Properties”. ![](https://images.ecency.com/DQmP7cQPWfJbEa2gmcv5yvdLz1DV3hBVea2sWE6YxPecwiP/11.jpg) • En la pestaña "Permisos", marca la casilla "Permitir ejecutar el archivo como un programa". >• In the "Permissions" tab, check the "Allow the file to run as a program" box. ![](https://images.ecency.com/DQmbLej3okPKn3KN3Wkn89Wq4jBEEwVhTmkUM1Tyz1M7RrL/12.jpg) • En la pestaña "Abrir con", selecciona "OpenJDK Java 11 Runtime" y marca la casilla "Establecer como predeterminada". >• In the “Open with” tab, select “OpenJDK Java 11 Runtime” and check the “Set as default” box.
![](https://images.ecency.com/DQmetdXQshkU6TkYds6S4PB51Z6TD7mqDUFdRhXyuqkvcvL/13.jpg)
![](https://images.ecency.com/DQmQRELWrWuaP3bTfk84w3CUJsNkPfFo53s3p4KvAjjsjCt/14.jpg)
Una vez hecho esto podemos hacer doble clic en el archivo **.jar** para ejecutarlo de manera normal, dicho archivo debería abrirse sin problemas, el último paso es muy importante si solemos usar muchos programas **.jar** como en mi caso. >Once this is done we can double click on the **.jar** file to run it normally, said file should open without problems, the last step is very important if we usually use many **.jar** programs as in my case.
![](https://images.ecency.com/DQmVgqVa5fmZC62QoT3a4tXvrepZvrXBMnvXeTGY3mxkivz/15.jpg)
![](https://images.ecency.com/DQmetgsLbv7e62o5HGKXapuEagU7PvqhPzG5CjDZvGod2LZ/16.jpg)
Espero que este pequeño tutorial les haya parecido interesante, saludos amigos míos. >I hope you found this little tutorial interesting, greetings my friends. ![](https://images.ecency.com/DQmT9cBeiZqowJD2rS5xyUe2cR1Epic2gJvc4a6twLrf4Yj/lineas_derp.png) **¡Gracias por leer!/¡Thank you for reading!** **_¡Hasta la próxima!/¡Until next time!_** **_Separador de texto creado en canva/Text separator created in canva_** **_Todas las capturas mostradas fueron tomadas por mi durante el proceso / All screenshots shown were taken by me during the process_**
#hive-106817 #spanish #geekzone #tech #java #tutorial #linux #learning #neoxian
Payout: 0.000 HBD
Votes: 42
More interactions (upvote, reblog, reply) coming soon.