Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have recently upgraded to 12.04 and I am using GNOME classic.

I want to run a .jar file by simply double clicking it. How would I go about doing this? I have OpenJDK 6 installed.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Here is a desktop file I wrote. Stick it in a file named Java.desktop under ~/.local/share/applications:

[Desktop Entry]
Encoding=UTF-8
Name=Java (Jar)
Exec=java -jar %u
Type=Application
Terminal=true
MimeType=application/x-java-archive

If the folder does not exist then you can create it as follows:

mkdir -p ~/.local/share/applications
share|improve this answer
    
I don't have that directory. –  Harris6310 Apr 8 '12 at 18:47
    
Then create it. –  Relish Apr 8 '12 at 18:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.