0

I am trying to install minecraft on to my computer and i was able to do everything except change the .jar to "Open with" JRE. JRE does not appear in the list of programs

-Running ubuntu 13.04

-Have JRE 6/7

2
  • Which JRE do you have installed? OpenJDK or Sun/Oracle Java?
    – Thomas Ward
    Jul 21, 2013 at 20:13
  • OpenJDK is what i am running Jul 21, 2013 at 21:22

3 Answers 3

1

Open /usr/share/applications and look for a file named "OpenJDK Java 6 Runtime". If it doesn't exists create a file named /usr/share/applications/openjdk-6-java.desktop with the following contents:

[Desktop Entry]
Name=OpenJDK Java 6 Runtime
Comment=OpenJDK Java 6 Runtime
Exec=cautious-launcher %f /usr/lib/jvm/java-6-openjdk-i386/bin/java -jar
Terminal=false
Type=Application
Icon=openjdk-6
MimeType=application/x-java-archive;application/java-archive;application/x-jar;
NoDisplay=true

You should change the "/usr/lib/jvm/java-6-openjdk-i386/bin/java" part of Exec to the location of java on your system. Then reboot and the option should be there.

2
  • I have found the file, and it is there. Now what? Jul 21, 2013 at 23:52
  • 1
    Same for me, but I'm running Debian. The file is there, but it doesn't appear as an option when I right-click nor does it appear on the menu. The links are pointing to the right places, I'm not sure why this is happening.
    – 2013Asker
    Nov 5, 2013 at 21:45
0

It should give you the option to do "Open with another application" if you right click the thing. You can then hit "Other applications" and look for OpenJDK 6/7 or similar runtime environment and that should work and allow you to select to run the minecraft.jar with the OpenJDK runtime.

0

I had the same problem with OpenJDK 7 and solved it by doing the following. By the way, I'm running Debian SID, so the same solution probably applies.

See if you have ./openjdk-7-java.desktop in one of the the following locations: /home/YOUR_USER_NAME_HERE/.local/share/applications or /usr/share/applications. You may need to enable show hidden files option.

If you do have it:

  1. open the file
  2. locate the line that says: Exec=
  3. go to the end of the line
  4. add a whitespace and the following: %f
  5. save the file

E.G.

You find the following file:

[Desktop Entry]

Name=OpenJDK Java 7 Runtime

Comment=OpenJDK Java 7 Runtime

Exec=/usr/bin/java -jar

Terminal=false

Type=Application

Icon=openjdk-7

MimeType=application/x-java-archive;application/java-archive;application/x-jar;

NoDisplay=false

Just change the line that starts with Exec= to the following:

Exec=/usr/bin/java -jar %f

Now it should work fine.

If you don't find the file in any of those locations:

  1. Try reinstalling OpenJDK and check again
  2. Try creating a file as Joren suggested

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .