Minecraft for Linux - Black Screen Fix

UPDATE:

This article is terribly old, and you should have no issues running minecraft with the files provided by Mojang. I did, however have an issue loading them on 64bit linux. Please see the more recent article about this issue:

http://timashley.me/node/1370

Minecraft

If you haven't heard already, Minecraft is one of the most epic open world, sandbox, survival and crafting game to hit the Internet in ages. Even in it's Alpha stage, it's become so popular in such a short amount of time that the developers website crashes daily.

In this tutorial, i show you how to play Minecraft on any Linux OS (32bit and 64bit)

1) Add the Canonical Partner Repository (For Ubuntu\Mint users) and Update

# sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" && sudo apt-get update

2) Install Java6 Runtime Environment

# sudo apt-get install sun-java6-jre

3) Download Minecraft and Extract it

# wget http://www.timashley.me/files/minecraft_alpha_1.1.2.tar.gz && tar zxvf minecraft_alpha_1.1.2.tar.gz

4) Change to Minecraft folder

# cd minecraft_alpha_1.1.2

5) Move .minecraft hidden folder to the root of your home folder

# mv .minecraft ~/

6) Launch Minecraft

# java -jar ~/.minecraft/minecraft_name.jar

Pick a nickname (for LAN Server games), Login with blank credentials and select "Play offline"

!!-BLACK SCREEN FIX-!!

1) Download Maverik Java Monkey Engine libraries

32bit: http://mirrors.kernel.org/ubuntu/pool/universe/l/lwjgl/liblwjgl-java-jni...

64bit: http://mirrors.kernel.org/ubuntu/pool/universe/l/lwjgl/liblwjgl-java-jni...

2) Extract the Debian package

32bit: dpkg -x liblwjgl-java-jni_2.4.2+dfsg-3_i386.deb /tmp/lwjgl

64bit: dpkg -x liblwjgl-java-jni_2.4.2+dfsg-3_amd64.deb /tmp/lwjgl

3) Move liblwjgl.so to Minecraft folder

# mv /tmp/lwjgl/usr/lib/jni/liblwjgl.so ~/.minecraft/bin/natives

4) Download Java Monkey Engine binary package

http://code.google.com/p/jmonkeyengine/downloads/detail?name=jME2_0_1-StableDistribution.zip&can=2&q=

5) Extract Java Monkey Engine binary pacakge and change to its folder

# unzip jME2_0_1-StableDistribution.zip && cd jME2_0_1-StableDistribution/jME2_0_1-StableDistribution/

6) Replace jar files in the Minecraft folder

# mv lib/lwjgl/jinput.jar ~/.minecraft/bin/

# mv lib/lwjgl/lwjgl.jar ~/.minecraft/bin/

# mv lib/lwjgl/lwjgl_util.jar ~/.minecraft/bin/

7) Copy library files to the Minecraft folder

# mv lib/lwjgl/native/linux/lib*.* ~/.minecraft/bin/natives

8) Launch minecraft

# java -jar .minecraft/minecraft_name.jar

Pick a nickname (for LAN Server games), Login with blank credentials and select "Play offline"

Comments

Hey, i just installed Ubuntu on my laptop today (got bored) and i have never used it before. so i might have done something wrong.

i got it to download the jar file fine, but i couldnt get it to extract. so in my "home/user" is there now minecraft_alpha_1.1.2.tar.gz. but i dont have the .minecraft folder.

still i tried java -jar .minecraft/minecraft_name.jar, and the loginscreen came, so i logged in. it starting downloading a lot of stuff. and then this error appeared.

Fatal error occured (5): no !/ in spec
Extracting: linux_natives.jar.lzma to linux_natives.jar

Any help will be awesome :)

By Anonymous (not verified)

Congrats on installing Ubuntu! If you need any tips or have any questions about it, feel free to send me an email via http://www.timashley.me/contact

We downloaded AND extracted minecraft_alpha_1.1.2.tar.gz in step 2. Make sure you're doing this in your home folder. Pro tip: any file or folder that starts with a period (.) is "hidden". To unhide these hidden folders, hit CTRL-H. Seeing how .minecraft is a hidden folder, you will have to toggle this to view it.

Make sure you're not using another minecraft that was previously installed. If there was, just backup your .minecraft/saves/ folder and start from scratch by deleting the .minecraft folder. Start from step 1 and try again.

You shouldn't have to login at all. The version of Minecraft that im hosting is "patched" so you can play for free. Just hit login with BLANK user and BLANK password and it will let you in.

I don't recall my client downloading anything at all. Maybe it downloaded some new packages that break what we're doing in this article.

Try it again and get back to us. Maybe someone else is having the same problem as you are.

Thanks for the comment and enjoy Ubuntu Linux!

By Tim Ashley

I am having this exact problem as well. Same error and I put the .minecraft in the right place.

I'm running ubuntu 10.10 64bit with sun-java

By Anonymous (not verified)

I've tested this article on two 64bit linux boxes i have and it works fine. I wonder what the issue could be...

By Tim Ashley

Just install the sun-java package and play in the browser, easier and runs better too.

By Anonymous (not verified)

How exactly do you play in the browser? doesn't work for me

By Anonymous (not verified)

I find the game runs a lot better in the JRE then it does in the browser. Forget the browser! LOL.

By Tim Ashley

When I try to start the Minecraft_name.jar file, a little dialog box comes up labeled "Name". No matter what I do, if I press the "OK" button, it shows this (When running from Terminal):
Exception in thread "main" java.lang.ClassNotFoundException: net.minecraft.LauncherFrame
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at Loader.load(Loader.java:25)
at Loader.main(Loader.java:19)

Strangely enough, it also prevents me from typing any more commands into the Terminal that it was launched on, almost as if it was trying to do something... Help?

By Anonymous (not verified)

Make sure you have your hidden .minecraft folder in your users home folder, i.e. /home/user/.minecraft

Go once over and patch your files again, ensure the latest java is installed as well.

By Tim Ashley

Still didn't work... Re-downloaded and re-did the process... Checked for a new version of Sun-Java... Executed from Terminal... Still the same error.

Exception in thread "main" java.lang.ClassNotFoundException: net.minecraft.LauncherFrame
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at Loader.load(Loader.java:25)
at Loader.main(Loader.java:19)

Perhaps I should try installing Maverik Java Monkey Engine?

By Anonymous (not verified)

Email me using the Contact link. I'll send you what im using, it works great. This article is a little out-dated.

By Tim Ashley

I wanna say thank you so much for this post, its given me hope on linux, as i just recently put it into my computer. however, i am having difficulty with game installations. This post however is the first i have seen to help set up a game. I REALLY want to play Minecraft but i am having difficulties...

I followed the first step with no difficutly, termainal did most of the work and everything was successful.

second step was just as successful and on the end it said some index items downloaded in error but were ignored or replaced, so i assume thats an ok thing to happen..

third step is were it gets tricky for me. Though i follow the step and the game is downloaded successfully and is extracted and succesfully hidden (i have checked) all should be in order so to speak. its all in my home folder already. that is its in home/me/.minecraft... is that correct? I asssume yes by other posts.

fourth step is weird to me. i put in the command in terminal and what shows up is,
bash: cd: minecraft_alpha_1.1.2: No such file or directory
so i figured i did something wrong or its right already. i dont understand what you ment by "change to minecraft folder." If you could clarify that please.

I went on with the proceeder anyway, assuming that i had done all steps correctly by having minecraft in home folder already so 4 and 5 were done for me. I tried to run the game using step 6 and end up getting what all other patrons of your site get with the same issue...

java -jar ~/.minecraft/minecraft_name.jar
test
Exception in thread "main" java.lang.ClassNotFoundException: net.minecraft.LauncherFrame
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at Loader.load(Loader.java:25)
at Loader.main(Loader.java:19)
i stopped here because im stumped. Please help me. I only hope this thread is still active and someone can help me.

By Anonymous (not verified)

Thanks for the guide, i've complete all the passage but finally it doesen't work!
When I write: java -jar .minecraft/minecraft_name.jar

He says:

Unable to access jarfile .minecraft/minecraft_name.jar

Someone can help me please?

By Anonymous (not verified)

I just downlaoded the minecraft.exe file from the offical minecraft page and ran the commaned he last listed. I'm using Ubuntu as well....

java -Xmx1024M -Xms512M -cp Minecraft.jar net.minecraft.LauncherFrame

By Anonymous (not verified)

i got everything working except when i go past the log in menu. the option to play offline is faded and cant be pressed.
can u help?

By Anonymous (not verified)

1) Was this a fresh install (following this article)?

2) Did you login with a user and password?

If you're using the patched version im hosting on my site, then you shouldnt have to enter any login information. Just leave the User/Password fields blank and login.

By Tim Ashley

The game seems to be working, but when I try placing a dug up block of dirt(or a sapling, or a workbench), or scrolling through my held items, it just ignores me. Digging/punching still works as usual, and in the inventory/crafting, right click works fine(I was able to make the workbench). Could this be related to the loader?(I do also have the click-menu bug, circumvented by going fullscreen).

By Anonymous (not verified)

I haven't seen anyone else with this issue. I'm not sure what it might be.

By Tim Ashley

I had this problem, but only because the game lagged so much that i almost lost connection to the server.

By Anonymous (not verified)

The game runs normally, but as soon as I try to break something, the texture shows signs of wear for a split second but then goes back to its original state. In other words, I can't break anything or collect anything besides flowers. Do you have any idea of what might be causing this and how I might fix it?

By Anonymous (not verified)

Are you clicking once, or holding the mouse button down? Because you have to hold it down until it breaks.

By Anonymous (not verified)

Hey, thanks for your great help.

I was wondering whether you had 1.2.1_01 (Halloween update) for Linux? I tried just replacing "resources" and "bin" folders that I downloaded, but I get a black screen every time. Any ideas?

Thanks!

By Anonymous (not verified)

I'm not hosting the most recent Halloween version. You can try the version i have here and if you like it, purchase it. :)

By Tim Ashley

You DO realize, that there's a liblwjgl.so in the jME2_0_1-StableDistribution.zip package, which in step 7 replaces the liblwjgl.so copied from the debian package in step 3 of the black screen fix?

... so step 1+2+3 of the Black Screen Fix are completely unnecessary.

By Anonymous (not verified)

#! /bin/sh
sudo apt-get install sun-java6-jre
#http://www.minecraft.net/download/Minecraft.jar?v=1293821927255
wget http://www.timashley.me/files/minecraft_alpha_1.1.2.tar.gz && tar zxvf minecraft_alpha_1.1.2.tar.gz
cd minecraft_alpha_1.1.2
mv .minecraft ~/
java -jar .minecraft/minecraft_name.jar

## 32 bit
#wget http://mirrors.kernel.org/ubuntu/pool/universe/l/lwjgl/liblwjgl-java-jni...
#dpkg -x liblwjgl-java-jni_2.4.2+dfsg-3_i386.deb /tmp/lwjgl

## 64 bit
wget http://mirrors.kernel.org/ubuntu/pool/universe/l/lwjgl/liblwjgl-java-jni...
dpkg -x liblwjgl-java-jni_2.4.2+dfsg-3_amd64.deb /tmp/lwjgl

mv /tmp/lwjgl/usr/lib/jni/liblwjgl.so ~/.minecraft/bin/natives

wget http://jmonkeyengine.googlecode.com/files/jME2_0_1-StableDistribution.zip
unzip jME2_0_1-StableDistribution.zip && cd jME2_0_1-StableDistribution/jME2_0_1-StableDistribution/
mv lib/lwjgl/jinput.jar ~/.minecraft/bin/
mv lib/lwjgl/lwjgl.jar ~/.minecraft/bin/
mv lib/lwjgl/lwjgl_util.jar ~/.minecraft/bin/
mv lib/lwjgl/native/linux/lib*.* ~/.minecraft/bin/natives
java -jar .minecraft/minecraft_name.jar

By Anonymous (not verified)

Hello, what do you make of this?

loki@Manorx:~$ java -jar .minecraft/minecraft_name.jar
name
Exception in thread "main" java.lang.ClassNotFoundException: net.minecraft.LauncherFrame
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at Loader.load(Loader.java:25)
at Loader.main(Loader.java:19)

using Ubuntu 10.04 and Java build 1.6.0_22-b04

Fresh install of java and minecraft

This is after the entering "name" in the multiplayer name dialog.

It worked for a day, now i cant get it to tun again. I'm hesitant to buy it if I can't get this to run reliably, but I really wanna get back in.

-Cheers
JackKnifeBarber256

By Anonymous (not verified)

I've got the same problem, only i'm using ubuntu 10.10 64bit.
If anyone has any idea what this could be help would be greatly appreciated.

Thank you,

David Maes

By Anonymous (not verified)

http://www.minecraft.net/download.jsp download "Minecraft.jar" and "java -jar .minecraft/minecraft.jar", and play offline ;) http://img6.imagebanana.com/img/9ctwpxw7/mine.gif

By Anonymous (not verified)

Dude your animated gif is awesome :) Thanks for commenting!

By Tim Ashley

thank you for putting in that missing link. I downloaded the .jar and all was well~

By Anonymous (not verified)

How to connect to private server? I installed minecraft, but i want to play on my friends server, how can I do it?

By Anonymous (not verified)

Your friend needs to forward the appropriate ports on his router and provide you the IP address to connect to. I've been running a private server on my LAN for awhile now, should work just fine.

By Tim Ashley

You are my god... Thanks a lot for your job dude!

By Anonymous (not verified)

really, that was great! it got my MC to work with 1.3 update :| not sure if the update messed it up or wut. but, i am glad i can read terminal fairly well, or it would have more difficult to follow to given directions thanks!

By Anonymous (not verified)

I don't understand steps 4 and 5, sorry i just installed ubuntu 10.04 x32 in my laptop

By Anonymous (not verified)

Step 4 downloads a .zip file

Step 5 Extracts the .zip file you downloaded to a folder

By Tim Ashley

i mean the upper steps 4 and 5, move folder and the other one

By Anonymous (not verified)

Sorry!

Step 4 changes to the new directory (after extracting the file)

Step 5 moves the hidden folder .minecraft to your home folder

By Tim Ashley

i really apreciate your help and if you have problems reading me, sorry, im colombian, so, i dont know how to change the file to the new directory, i copy and paste the line in your blog bug in my console it says"no such file in the directory" i can see the file tar.bz in my home directory so i dont know what to do

By Anonymous (not verified)

If you're using a GUI (Desktop), browse to the tar.gz you downloaded, right click and extract the package.

Press CTRL-H to show hidden files and folders, you should see a .minecraft folder.

Move .minecraft to your Home Folder

Run the java command (Step 6 or 8)

By Tim Ashley

thanks for your patience, i see the .minecraft folder, lets say my name is bob, so:
.minecraft is on /home/bob/.minecraft, what you want to say is to move the folder to the home folder? like /home/.minecraft ? or where else?

By Anonymous (not verified)

If your username was bob, your home folder would be /home/bob

The .minecraft folder needs to be in your home folder, so the path should be:

/home/bob/.minecraft

By Tim Ashley

i really apreciate ur patience, i did everything, i followed every step and now when i try to play i put a name for lan and the nothing hapens.

here is what my console shows:

Exception in thread "main" java.lang.ClassNotFoundException: net.minecraft.LauncherFrame
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at Loader.load(Loader.java:25)
at Loader.main(Loader.java:19)

By Anonymous (not verified)

Enter any name you want and select "Play offline"

By Tim Ashley

how do i select to play "offline"?

By Anonymous (not verified)

Exception in thread "main" java.lang.ClassNotFoundException: net.minecraft.LauncherFrame
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at Loader.load(Loader.java:25)
at Loader.main(Loader.java:19)
Got the exact same thing,

When i enter "java -jar ~/.minecraft/minecraft_name.jar"
Little box with Input on the topbar then Name and a dialog box with the options of "OK" or "Cancel"

Anyone got an answer?

By Anonymous (not verified)

i have that same problem

By Anonymous (not verified)

Thank you very much! I have been looking all over for this!
*notch*

PS: Love your CAPTCHA prompt.

By Anonymous (not verified)

I am running into the same thing everyone else is running into. I am able to enter all of the commands without any errors, but when i attempt to run

java -jar ~/.minecraft/minecraft_name.jar

I get the following after entering my name


test
Exception in thread "main" java.lang.ClassNotFoundException: net.minecraft.LauncherFrame
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at Loader.load(Loader.java:25)
at Loader.main(Loader.java:19)

The application does not exit though, it hangs like it is trying to do something (like when you open a GUI application via terminal in Linux, it will just sit there and wait until you close the GUI then return you to the shell).

I am running

2.6.38-11-generic-pae i386 GNU/Linux

Ubuntu 11.04

Strange thing is I know I got minecraft to work without doing anything other than installing java in a virtual machine last night! I dont understand why I am running into issues trying to get it to work on a non-virtualized install.. Any ideas?

By Anonymous (not verified)

This article is quite outdated now. I don't think the black screen is an issue in the newer versions of Minecraft, feel free to contact me privately if you want an updated version.

By Tim Ashley

Pages