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

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.

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.

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

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”.

• 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.

• 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.

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.

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.

¡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



0
0
0.000
5 comments
avatar

¡Enhorabuena!


Has recibido el voto de PROYECTO CHESS BROTHERS

✅ Has hecho un buen trabajo, por lo cual tu publicación ha sido valorada y ha recibido el apoyo de parte de CHESS BROTHERS ♔ 💪


♟ Te invitamos a usar nuestra etiqueta #chessbrothers y a que aprendas más sobre nosotros.

♟♟ También puedes contactarnos en nuestro servidor de Discord y promocionar allí tus publicaciones.

♟♟♟ Considera unirte a nuestro trail de curación para que trabajemos en equipo y recibas recompensas automáticamente.

♞♟ Echa un vistazo a nuestra cuenta @chessbrotherspro para que te informes sobre el proceso de curación llevado a diario por nuestro equipo.


🏅 Si quieres obtener ganancias con tu delegacion de HP y apoyar a nuestro proyecto, te invitamos a unirte al plan Master Investor. Aquí puedes aprender cómo hacerlo.


Cordialmente

El equipo de CHESS BROTHERS

0
0
0.000