Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create a launcher for Minecraft, but in order to make a proper working launcher I need to have OpenJDK Java 7 set as the default application for opening the .jar file. Here's the problem: when I look at the Open With tab of its Properties window, there's no way to select OpenJDK. What do?

share|improve this question

I think this might be a better explanation, if you haven't already found it yourself.

Open a terminal window and type:

cd /usr/share/applications

Now follow the Step #4 of this answer onward!

share|improve this answer

All the file associations are stored in the file :


create a java.desktop for java in /usr/share/applications/

see here for instructions : link

change the line at the beginning of the file


share|improve this answer
I don't think I fully understand. So I should enter into gedit: application/x-jar=java.desktop Type=Application Name=Java and what exactly should be in the Exec field? – Xenoverse Mar 8 '13 at 10:28
exec=/usr/bin/java – Anam Ahmed Mar 8 '13 at 16:52
Ok I did that and saved it as /usr/share/applications/java.desktop, now what? It doesn't appear to have done anything. – Xenoverse Mar 8 '13 at 19:14

Your Answer


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.