Unable To Run minecraft.jar in XFCE4?

XtremeAero426

Honorable
Jan 4, 2014
543
0
11,160
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?
 
Solution
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

I've already installed the latest java. Also, [java minecraft.jar] gives me the error that it can't find the file.
 

XtremeAero426

Honorable
Jan 4, 2014
543
0
11,160


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


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


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


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


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


So how would I fix this?
 


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.
 
Solution

TRENDING THREADS