In terminal when try to run jar file it doesn't launch. I have recently uninstalled open jdk 6 to save some space if that matters.

abe@abe-Dimension-8400:~/Desktop$ java -jar Minecraft.jar

I use openjdk-7-jdk-headless java version. Tried re-installing the openjdk-7-jre-headless

abe@abe-Dimension-8400:~/Desktop$ sudo apt-get install openjdk-7-jre-headless

Reading package lists... Done

Building dependency tree    

Reading state information... Done

openjdk-7-jre-headless is already the newest version.

Please help Thanks.

  • fo1's solution resulted in the same error code. – Bob smith Dec 2 '14 at 4:34
  • What does "doesn't work" mean? Do you get any error messages? Does nothing happen at all? – muru Dec 2 '14 at 5:46
  • Are you certain that no jar files are working or only Minecraft.jar is not working. – Sudheer Dec 2 '14 at 6:50
  • Does not work mean the game wont launch nothing. – Bob smith Dec 3 '14 at 3:28

Setup environment variables.

You should Setup Environment Variables for java because all of java based application’s use environment variables to work. Open your .bashrc file and add the below coloured line to end of the file. Make sure you need to mention your path instead of us. Save and exit.

This is an example taken from http://www.2daygeek.com/how-to-install-java-7-openjdk-on-ubuntu/

magesh@magesh-desktop:~$ nano .bashrc

GNU nano 2.2.6                                    File: .bashrc                                                                              

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion

  • I think there is no need to add path for the openjdk version, the java bin file shortcuts are created in usr/bin/ with installation. – Sudheer Dec 2 '14 at 4:02
  • This did not work. anything else? – Bob smith Dec 2 '14 at 4:33
  • Did you try to apt-get autoremove then reinstall? – f01 Dec 2 '14 at 4:35

headless jre/jdk means "GUI is not needed and will not work". I suspect you want Minecraft to be GUI-based game. Then you need full jre.

Frankly "does not work" is not a useful symptom. What makes you believe it doesnt? Maybe you expected something and got something different? It's hard to guess.

  • Im sorry, when I mean does not work I mean the game does not launch even when I duble click the .jar. I have open jdk 7 fully installed aswell. – Bob smith Dec 3 '14 at 3:22
  • (1) I suggest you to check JAVA_HOME, just having correct PATH is not enough. (2) verify that java -version works with correct thing. (3) you are running jave -jar Minecraft.jar -- is there Main-Class actually in META-INF/manifest.mf? (4) do you double-click or type command? – Vladimir Kovalchuk Dec 4 '14 at 9:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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