Home Linux Community Forums New to Linux Getting Started with Linux Why can't I set Java as default to run JARs?

Why can't I set Java as default to run JARs?

Link to this post 15 Sep 12

Well this is really bothering me, I installed JDK1.7.0_07 but it wont allow me to set it as the default to open jar files. I can run the file but I have to select "Java Runtime Enviroment" every time. Is there any way I could add Java 7u7 to the list of applications to use with JAR files?

Link to this post 17 Sep 12

If u installed this under /usr/java then make a symbolic link to /usr/bin like:
ln -s /usr/java/jre1.7.0_07/java /usr/bin

Link to this post 25 Aug 14

Hello ,
If you are using UBUNTU:
Then to use it to open .jar files try the following.

Right click the .jar file > Properties.
Click on the “Open With” tab along the top.
Change the default choice to be Sun Java 6 Runtime.
Click Close and you should be ready to double click
If you are using another DISTRO tell us, we will try to give a solution.

Link to this post 23 Sep 14

The advice from sabriicone is what I usually do as well (for other file types).

Link to this post 25 Jan

First ensure JAVA_HOME environment variable is set properly like:

export JAVA_HOME=/usr/lib/jvm/java-openjdk-

Then configure MIME-handler of your browser or filemanager to open files like

java -jar

Further determine what java your running and if /usr/lib/jvm/java-openjdk- is your PATH environment variable. Otherwise you can do symlink to it by

ln -s /usr/lib/jvm/java-openjdk- /usr/bin/java

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board