• Welcome to Minecraft @ 3decibels.net.
 

News:

Twelve years of vanilla Minecraft?!

Main Menu

Attempting to run new version of Minecraft and failing HARD!

Started by finder3690, November 04, 2011, 05:05:25 PM

Previous topic - Next topic

finder3690



So I wanted to get my craft on today and it's just not happening. I saw that the server is now running 1.9pre5 so I went and downloaded the jar from the website. I proceeded to copy that jar to the local minecraft folder ($HOME/.minecraft/bin) and when I attempt to execute it I get "Failed to load Main-Class manifest attribute from minecraft.jar." If I blow away the whole directory and start from scratch with downloading a new jar from the website and running it, the game reports back that it's running 1.8.1. Am I missing something? Are the pre-releases hidden somewhere other than the download page?

nekoKaori

did you delete the original minecraft jar before putting in the new one

finder3690

LOL. Malaclipse's directions were perfect but that link to the jar was sending me to the official minecraft page earlier instead of serving up the file (WTF?!) I checked it a couple minutes ago and tried it again and now I'm back in.

Malaclipse

Quote from: finder3690 on November 05, 2011, 03:08:51 AM
LOL. Malaclipse's directions were perfect but that link to the jar was sending me to the official minecraft page earlier instead of serving up the file (WTF?!) I checked it a couple minutes ago and tried it again and now I'm back in.

So, Notch in his infinite wisdom has created some confusion with his packaging of the game. There are actually 2, yes count them 2, minecraft.jar's with different purposes for each. One is the game launcher and the other is the actual game itself. If you are on Windows you may be using the .exe instead of the Launcher.  You could also use the applet instead of the launcher. Anyway, here is a rundown.

- The minecraft.jar that you download from minecraft.net proper is the launcher. This jar contains a META-INF directory with a manifest and makes it an "executable" jar. As mentioned above you can use this, or the applet, or the exe.
- The launcher only provides the login screen and a means to download the rest of the game. If you "force update" from the launcher it always grabs the latest stable (i.e. 1.8.1).
- If you have never played minecraft on that computer before you need to run the launcher at least once, because it downloads all the other dependencies and sets up your .minecraft directory.
- Assuming you have run the launcher at least once you will have a second minecraft.jar in the .minecraft/bin directory. This jar is not an "executable" jar because it does not have a manifest with the main-class defined. Think of it more like a library, dll, or .so file. Although it is the "guts" of the program. \
- From here in, I'll refer to the .minecraft/bin/minecraft.jar as the Library and other one as the Launcher.

The thing I find find confusing people is that the Library has the same filename as the Launcher even though they are two very different files. Furthermore, the Library lives in a directory called "bin" which is usually where executable programs go. The Launcher itself doesn't live anywhere in particular so I put mine in my /home/mperry/bin directory, but /usr/local/bin would too (to share across accounts on Linux).

Assuming you put Launcher minecraft.jar in your /home/username/bin directory here are some quick run down of what to do.

- Run it once quick to setup your .minecraft directory like this: java -jar ~/bin/minecraft.jar
- Login and get to the screen where it gives you the option for Single or Multiplayer and then quit
- Next, copy the .minecraft so you can go back to 1.8.1 if needed. Here is an example using rsync:
  $ rsync -aP ~/.minecraft/ ~/.minecraft-1.8.1
- Now download the 1.9.5 Library jar file from (http://t.co/bsKW5CvB aka http://assets.minecraft.net/1_9-pre5/minecraft.jar) and overwrite the Library in ~/.minecraft/bin
- Next time you use the Launcher the login screen will still say 1.8 highlights, but don't worry about that. I think the login screen is a webpage, rss, or something and it doesn't detect what version you intended to run. Just log in.
- If you did it correct the screen with single/multiplayer etc should say 1.9.5 in the lower left.

While on the topic, you should allocate extra memory to Java heap. Below is a short bash script I use to launch minecraft with. It uses the java executable found in my path (currently 1.6.0_26-b03) and allocates 512MB to start and up to 2G. The -Xincgc enables incremental garbage collection which seems dramatically increased stability with my setup. Your mileage may vary.


#!/bin/bash
cd $HOME/.minecraft
exec java -Xincgc -Xms512m -Xmx2048m -jar $HOME/bin/minecraft.jar $*





nekoKaori

.........*stares confused* That is to many words for this point in the week.