Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
Minecraft in jdk 1.7.0_u2 x64

I have tried posting on the forums, but I really need help (I'm a server admin and really don't want to have to switch to Windows just to run Minecraft). Anyhow, I originally was running openjdk6 as I was told that 7 was unstable and was getting periodical lag spikes while walking (at least once every 3 seconds the screen would freeze for a tenth of a second).

After that, I attempted to install Sun's Java JDK7 (I couldn't get ahold of 6 without signing up for Oracle's newsletters). Upon attempting to run Minecraft, I got a black screen after logging in with this error message:

27 achievements
182 recipes
Setting user: Thunder7102, -1618112820878091307
Exception in thread "Minecraft main thread" java.lang.UnsatisfiedLinkError: /home/noiro/.minecraft/bin/natives/liblwjgl.so: /home/noiro/.minecraft/bin/natives/liblwjgl.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1939)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1864)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
        at java.lang.Runtime.load0(Runtime.java:792)
        at java.lang.System.load(System.java:1059)
        at org.lwjgl.Sys$1.run(Sys.java:69)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
        at org.lwjgl.Sys.loadLibrary(Sys.java:81)
        at org.lwjgl.Sys.<clinit>(Sys.java:98)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:132)
        at net.minecraft.client.Minecraft.a(SourceFile:184)
        at net.minecraft.client.Minecraft.run(SourceFile:657)
        at java.lang.Thread.run(Thread.java:722)

Now, this got me fed up, so I tried to install a Windows 7 virtual machine through virtualbox, I gave it 256mb of graphics memory with 2D and 3D acceleration and 3GB of RAM. I installed Java JDK7 for Windows (which does work from experience on my other Windows 7 partition). Once again, a black screen after login. What the heck is going on guys?

My System Specs:

Ubuntu 12.04 64bit Fully Updated running Gnome3 Nvidia GTS 450 1.3GB OC'd AMD Athlon II 4x 2.8Ghz 6GB of RAM

So, what do you think?

share|improve this question

marked as duplicate by Alvar, Takkat, fossfreedom Dec 29 '12 at 21:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

3 Answers 3

up vote 0 down vote accepted

You are trying to run a faulty copy of Minecraft. It contains a 32bit library that Java cannot load.

Honestly, have you obtained Minecraft in a legal manner? I do not believe an official copy would have such a bug.

share|improve this answer
    
I have bought Minecraft and downloaded the linux version from them. :P Yes, I have a legitimate copy. –  Signify Jul 14 '12 at 20:20
    
In that case, try the following: sudo apt-get install liblwjgl-java –  cumulus007 Jul 15 '12 at 7:13
    
Thanks, that worked like a charm. –  Signify Jul 16 '12 at 22:07
    
@cumulus007: I have a legal Minecraft downloaded with this script and I got the same error. Is that not the standard installation? –  l0b0 Oct 1 '12 at 20:15
2  
You might consider updating your answer to include the apt-get fix. I noticed this bug after switching from kubuntu to ubuntu. –  Ken Nov 25 '12 at 4:36
show 1 more comment

Have you installed the proprietary drivers for your Nvidia GTS 450?

Try the following:

sudo jockey-gtk

In the Additional Drivers window that appears, highlight 'NVIDIA accelerated graphics driver (version current) [recommended]' and click the Activate button on the bottom right. Lather, rinse, and see if Minecraft behaves any better.

share|improve this answer
    
I currently have the most updated Nvidia driver running. –  Signify Jul 14 '12 at 22:35
    
Potentially dumb suggestion: try removing them, logging out and back in, see if Minecraft behaves better. –  OpensourceFool Jul 14 '12 at 22:48
add comment

I don't really like using things from the ubuntu PPA, because they are often outdated (examples: playonlinux, flightgear).

Here's what i did to solve it (works also for the web version of minecraft):

cd /etc/ld.so.conf.d
sudo su
echo [path to java]/lib/amd64 > java.conf
ldconfig -v

now just run java by opening it with java in the file manager

P.D. you have to replace [path to java] with your java path, in the case you use openjdk7 (64 bit), it is /usr/lib/jvm/java-7-openjdk-amd64/jre

BTW: this is a duplicate of: this thread

share|improve this answer
    
If you find a duplicate question, flag it as duplicate. Never answer the duplicate question answer only the original. –  Alvar Dec 29 '12 at 21:47
add comment

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