Unable To Run minecraft.jar in XFCE4?

XtremeAero426

Honorable
Jan 4, 2014
543
0
11,160
62
So I installed java and tried to open minecraft.jar. The file didn't open. In fact, there was no error message, nothing happened. Nothing changed on my screen. No programs were closed or opened. Does anyone know how to fix this?
 

Pinhedd

Polypheme
Moderator


If you used a browser to download Minecraft it will most likely deposit the file in /home/<your username>/Downloads. Navigate there in the terminal and run the command.
 
Hi there. Welcome to Linux.

Unlike windows or Mac, In Linux the standard way to install software is through the repository.

First install Java (openJDK 7 is reccomended) or check if already installed.. Open the terminal and type :
Code:
java -version
Code:
sudo apt-get install openjdk-7-jre
(from here you can try to run the mincraft jar with:)
Code:
java minecraft.jar
However it is recommended that you use the unoffical installer, as this will keep minecraft up to date. Then add this [unoffical] repository and install minecraft-installer
https://launchpad.net/~minecraft-installer-peeps/+archive/ubuntu/minecraft-installer

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

XtremeAero426

Honorable
Jan 4, 2014
543
0
11,160
62
I've already installed the latest java. Also, [java minecraft.jar] gives me the error that it can't find the file.
 
Are you in the directory with the minecraft.jar when you try to run the command? Really though you should just try to use the minecraft-installer package if you are having trouble... it even adds a nice icon to your launcher.
 

XtremeAero426

Honorable
Jan 4, 2014
543
0
11,160
62


When I run [sudo add-apt-repository ppa:minecraft-installer-peeps/minecraft-installer] I get this error:

[apt-get-repository: command not found]
 

XtremeAero426

Honorable
Jan 4, 2014
543
0
11,160
62


I'm using xfce4 with the crouton installer on an Acer C720 Chromebook. I just checked and I think it's Debian.
 

Pinhedd

Polypheme
Moderator


You're trying to run it incorrectly.

What you're trying to have Java do is find a Java class named "minecraft.jar" on the classpath and start executing at the Main entry point in that class. No such thing exists.

What you have is an entire Java application bundled into a Java archive (jar, which is just a zip file with a different file extension). All of the java class files that it needs are contained within it. The entrypoint of this application is specified in a file inside of this archive. What you need to do instead is tell Java to execute the jar file and use the metadata contained within to figure out where to start. Do this as follows:

Code:
java -jar minecraft.jar
that was easy!
 

XtremeAero426

Honorable
Jan 4, 2014
543
0
11,160
62


I got the error: [Unable to access jarfile minecraft.jar]
 

Pinhedd

Polypheme
Moderator


then the file is not in the same folder in which you are invoking the JVM
 

XtremeAero426

Honorable
Jan 4, 2014
543
0
11,160
62


So how would I fix this?
 

Pinhedd

Polypheme
Moderator


If you used a browser to download Minecraft it will most likely deposit the file in /home/<your username>/Downloads. Navigate there in the terminal and run the command.
 

ASK THE COMMUNITY

TRENDING THREADS

Latest posts