Thursday, September 3, 2015

Run jar files in Linux

Run jar files in Linux

When people try to run the jar file, they click on it, It opens with an archive manager and showing the files. So how to run it by clicking on it ?
Well, it's easy, first you have to have java installed, whether it's Openjdk or OracleJdk.
Second mark it as executable.

make it executable

Then customize the "Open with" tab like these pictures :

Open with


Choose Openjdk or Oraclejdk, Depending on what you have.

Note : this process executed in Nautilus file manager, However it's almost the same steps for other file managers.

We can do it using Terminal too, first make it executable :

chmod +x test.jar

then run it with this command : 

java -jar test.jar


Share this article :


Post a Comment