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“:
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.