I have a problem running .jar files by double-clicking them. When I go to the Properties dialogue I can't find Java--only Archive Manager in the list of programs. But java -jar somefile.jar opens the program.
|
|
|
Maybe you don’t have the runtime environment installed! To install it try the following instructions.
Or you could install Oracle JRE using the PPA method with the following commands.
Then to use it to open .jar files try the following.
|
|||||
|
|
To make Java open .jar files per default (i.e. double click) right click on any .jar file to select Properties. In the following window select the "Open With" tab to see e.g. the follwing choice:
Select your Java runtime and press Set as default to make this your default application to open .jar files. |
|||
|
|
|
Adding a file called
After adding this file you should be able to find an entry called |
|||||||||||||
|
|
APPLICATION LAUNCHER After installing the Java runtime environment you can create a launch icon like other applications in the system by making a
APPLICATION ICON For the icon sizes, Linux support a variety of image formats (PNG, JPG, SVG, etc.) and sizes (16x16 ~ 512x512 px). You could use a 32x32 ~ 96x96 px PNG file, or a 128x128 ~ 512x512 px SVG file for better results. In this case I think that a 96x96 px PNG is enough for a nice Desktop/Dash. For more, take a look at: FILE ASSOCIATION For this step you have to create a MIME Tipe, if it doesn't exist, and associate it with the application in the Note: If you find something incorrect, please feel free to edit and correct. Thanks! |
||||
|
|
|
I am using Xfce 4 with Thunar file manager. I've installed Oracle JDK by downloading archive file from Oracle's official web site. I've extracted contents to my local folder and added Java to PATH. So I am able to execute following command from terminal
You can start *.jar files from terminal with following command
But if you want to start it by double-clicking on file I've done following steps, don't forget that I am using Thunar file manager on Xfce 4, steps may differ;
When you double click on the *.jar file it will execute a command (second command that I gave above) in the background and start Java program. Edit:When runtime installed via archive extraction, runtime won't show up on the list of application selector. I want to point that users can use commands if they added Java to PATH. |
|||||||||
|
