Making Java Runtime Default Application To Run .Jar's (Linux Mint 14 Cinnamon)
2 Attachment(s)
I can execute a .jar file but I have to select "Java Runtime Enviroment" every time. I want to execute this file with Java Runtime by default. I have Linux Mint 14 64 bit, Cinnamon. When I right-click on the file and go to open with, from the drop down, I have in the list: Java Runtime, Java Web Start, and OpenJDK Java 7 Runtime. The ones that will run it are: Java Runtime and OpenJDK Java 7 Runtime. However, when I go to the .jar file, properties > open with > show other applications, neither of these are listed. How can I change this? How can I add Java Runtime to this list? Note that I installed Java from the instructions on this page [w**.duinsoft.nl/packages.php?t=en] (under repository) and java works great.
output of java -version: java version "1.7.0_10" Java(TM) SE Runtime Environment (build 1.7.0_10-b18) Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode) |
First off, not all jar files are executable, so getting a sneak peak of the permissions tab of the file that you're trying to open would be very helpful ;).
If it's indeed a executable file, and you have permission to execute it, you should be able to open it either by double-clicking on it or by typing on the terminal java -jar <myjarfile.jar>. |
Thanks gacanepa, but that is not my question. It is executable, and I can execute it. My question is how can I run it with Java Runtime by default. The file is fast image resizer for java, you can download it yourself and see that it is executable h**p://sourceforge.net/projects/fir4j/files/
|
I downloaded the file, extracted it and placed its contents inside a folder named fir4j on my desktop.
Then created a launcher by right clicking on the desktop and used the following command inside a desktop launcher: Code:
java -jar /home/gacanepa/Desktop/fir4j/fir4j.jar Let me know if you need additional help or detailed step-by-step instructions - I'll be more than glad to help. |
Thanks, that worked.
|
Quote:
I'm glad to have been of help. |
solved by Snark1994
This will do it. Thanks Snark1994!
Okay, we got the problem sorted at least in cpocanada's case: the problem was that the correct mimetype is "application/x-java-archive" (I mistakenly said "application/java-archive"). So the fix was to use the following line in .local/share/applications/mimeapps.list: application/x-java-archive=openjdk-7-java.desktop from: http://www.linuxquestions.org/questi...ml#post4883785 |
All times are GMT -5. The time now is 06:33 AM. |