This question already has an answer here:

I'm having trouble opening Minecraft.jar because there is no java runtime in open with listed. Even though I have installed it. This seems to be the solution JRE not showing up in "Open with" list But I don't understand how I'm supposed to make the file hes talking about. I right clicked in /usr/share/applications/ but it didn't give me an option to make a file.

Thanks for any help.

marked as duplicate by A.B., Seth Apr 25 '15 at 20:58

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • What JRE did you install? You need OpenJDK 7 from the Software Center. – TheWanderer Apr 25 '15 at 14:54
  • I installed OpenJDK 7 from the Software Center. – user3000742 Apr 25 '15 at 15:02
  • Did you reboot after you installed it? Also make sure that, under Mnecraft.jar>Properties>Permissions, the executable permission is ticked. – TheWanderer Apr 25 '15 at 15:05

Install Java with this commands and you have an entry in Open with:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

and then

sudo apt-get install oracle-java8-set-default

And in order to do things more easily, use the Minecraft Installer.

sudo add-apt-repository ppa:minecraft-installer-peeps/minecraft-installer
sudo apt-get update
sudo apt-get install minecraft-installer

Then run Minecraft from the Dash.

  • Please don't post duplicate answers. – Seth Apr 25 '15 at 20:58
  • @Seth OK, voted for close – A.B. Apr 25 '15 at 21:21
  • Tried with openjdk8 and it didn't work. Then installed oracle java9. It didn't work. Then I installed java8 and now it's working now. Thanks! – Hrvoje T Dec 20 '16 at 23:14

Make a run.sh file in the directory with the Minecraft.jar containing

 java -jar Minecraft.jar

or anywhere you like changing Minecraft.jar to the correct filepath. Mark the file as executable and run it.

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