[How To] Open, Run, Install Or Execute A JAR File In Ubuntu Linux

Care to Share?

So last week I was trying to run a java application AndroMouse in my Ubuntu 12.04. The application executable was in a .jar file which is kind of Java based executable. If you have Java installed in your Ubuntu, you should be able to run it either by double clicking or by selecting from right click options. First of all, Ubuntu doesn’t come with Java pre-installed in it. You might want to check if Java has been installed in Ubuntu.

Even if Java is installed in Ubuntu you might not be able to run the .jar file straight forward. Well, it happened with me. I had just installed Java and tried to run the .jar file from the right click options. But I did not see any. So lets see How can did I solve the problem and was finally able to execute .Jar file in Ubuntu.

Right click on the .jar file and choose the option “Open With Other Application“:

Ubuntu Jar Files

Now on the next screen, select the option Show other applications:

In other applications, if you do not find option for Java, click on Find applications online:

This tool will give you several options for installing Java Runtime Environment. Choose whichever you prefer. And then just continue with the installation:

Now when you have Java Runtime Environment installed, right click on the .Jar file again and now you should be able to see the option Open With OpenJDK Java 6 Runtime. Select it and successfully run it.

Enjoy Java on Ubuntu.

  • Pingback: Anonymous

  • Bondye

    Hi, I did exactly what you did. But how can I be able to double click instead of right click and choose “Open With OPENJDK Java 6 Runtime”. When I try Right click .jar file > Properties > Open With I cant find Openjdk java anywhere :(

    • fcassia

      you need to eliminate the default handler, in other words remove the association of .jar files with the Archive Manager. Only then you can associate Jar files with the Java launcher