14

I have Ubuntu 11.10 64-bit and I installed JDK 1.7.0 update 2 x64 via webupd8 page. But currently I have problem with minecraft game. After downloading launcher from Minecraft.net and lauch the game by java -jar /home/zrebec/Downloads/minecraft.jar launcehr is launched normaly, after login the game download the updates but then I got just the black screen with this in terminal:

Setting user: zrebec, -356009615199623309
Exception in thread "Minecraft main thread" java.lang.UnsatisfiedLinkError: /home/zrebec/.minecraft/bin/natives/liblwjgl.so: /home/zrebec/.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.loadLibrary0(ClassLoader.java:1928)
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:180)
at net.minecraft.client.Minecraft.run(SourceFile:648)
at java.lang.Thread.run(Thread.java:722)

Please anyone can help me with this? I think that problem will be in architecture becase:

liblwjgl.so: /home/zrebec/.minecraft/bin/natives/liblwjgl.so: wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)

Any idea please?

I know, maybe this one is off topic because maybe its not Ubuntu problem maybe but in 64-bit works all perfectly and I think that accepted answer can help to many users and can make better playing games under linux. Really. Thank you very much for any idea.

  • 2
    Why not stick to openjdk-6-jre? My brother is playing Minecraft on a 64-bit Kubuntu 11.10 without issues. – Lekensteyn Feb 02 '12 at 12:01
  • With openjdk-6-jre I had some issues during the game. After around 2 - 3 minus the game flashy and then crash down :( Maybe som bugs in game? But in windows I havent any problems with this. I can play hours and hours and nothing. And there I using Oracle JDK 1.7 (JDK because Im junior Java programmer - now learning Java). Thanks – Bambi Bunny Feb 02 '12 at 12:08
  • I'd try a 32bit version of Java, at least that is what I would suspect to be the problem with this error message. – Mad Scientist Feb 02 '12 at 12:29
  • And so.... problem resists with openjdk-7-jre-amd64 :) I installed openjdk java version "1.7.0_147-icedtea" OpenJDK Runtime Environment (IcedTea7 2.0) (7~b147-2.0-0ubuntu0.11.10.1) OpenJDK 64-Bit Server VM (build 21.0-b17, mixed mode) – Bambi Bunny Feb 02 '12 at 12:30
  • Mine works with openjdk but not with the Oracle jdk. Using Minecraft 1.2.5. – Luis Alvarado Apr 18 '12 at 18:38

9 Answers9

19

I have the same problem but I installed via webupd8 - Install Oracle Java (JDK) 7 in Ubuntu via PPA Repository, searching the internet I found this script (I'm adapted the script to my system) but basically this is:

#!/bin/bash
export LD_LIBRARY_PATH="/opt/java/jre/lib/amd64"
java minecraft.jar

The script for my system:

#!/bin/bash
export LD_LIBRARY_PATH="/usr/lib/jvm/java-7-oracle/jre/lib/amd64"
java -jar Minecraft.jar

I hope this will be useful

JoZ3
  • 639
  • 4
  • 13
8

Found this on a Fedora forum and it worked nicely for me running 12.04 Ubuntu-64bit with OpenJDK7u3

Link

"I just had the same problem, and here is what worked for me:

  1. Go to http://lwjgl.org/download.php
  2. Click the link to download the newest stable release
  3. Download lwjgl-x.x.x.zip (lwjgl-2.8.3.zip at the time of writing)
  4. Go to your home folder and press ctrl + h to show your hidden files
  5. Go to .minecraft/bin and copy the matching .jar files from the jar folder in the zip that you downloaded into there
  6. Copy the .so files from the native/linux folder in the zip file to .minecraft/bin/natives
  7. Launch Minecraft

Hope that helps! "

Varanuskomo
  • 81
  • 1
  • 2
3

Instead of launching a script everytime you want to run minecraft, you can also add the libraries to the ldconfig:

sudo su -c "echo [path to java]/lib/amd64(or i386) > /etc/ld.so.conf.d/java.conf"
sudo ldconfig

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

(example of line 1: sudo su -c "echo /usr/lib/jvm/oracle-java/lib/amd64 > /etc/ld.so.conf.d/java.conf")

mid_kid
  • 691
2

If you use this type of Java, http://www.wikihow.com/Install-Oracle-Java-on-Ubuntu-Linux, then this is the correct code you need.

#!/bin/bash
export LD_LIBRARY_PATH="/usr/local/java/jre1.7.0_05/lib/amd64"
java -jar /path to your minecraft.jar file

Thank-you JoZ3, I just slightly modified your code.

1

@JoZ3 Thank you very much. You solved my problem. Trick was to redirect that path. Just a small tut for beginners. Before reading this, I assumed that you all installed JDK 7 like JoZ3 wrote in his post. (Oracle JDK is needed.)

  1. Download minecraft.jar. Place it in some folder on desktop.
  2. Create a text document and paste JoZ3's commands in it. This is the required command and we are creating a shell script.

    #!/bin/bash  
    export LD_LIBRARY_PATH="/usr/lib/jvm/java-7-oracle/jre/lib/amd64"  
    java -jar Minecraft.jar 
    

    Save it as, for example, fix.sh.

  3. Make sure you run chmod fix.sh with this command. cd to the directory where the file is located and type in the terminal the following commands:

    sudo chmod 755 fix.sh
    
  4. Run fix.sh from terminal by dragging it to the terminal and pressing Enter, or by manual typing its location in terminal and pressing Enter.

Game should work now! It solved my problem.

Игор
  • 151
0

So... I found the solution :)

By this page I crated this script and its works perfectly :) I remove OpenJDK and after executing this script the game works :)

export LD_LIBRARY_PATH="/usr/lib/jvm/jdk1.7.0_02/jre/lib/amd64"
java -Xmx1024M -Xms512M -cp minecraft.jar net.minecraft.LauncherFrame
0

I downloaded the windows exe, let it load, took the minecraft jar out of windows, I found that that works for me(since the one for linux on their site aint)

Dr_Bunsen
  • 4,713
  • 4
  • 28
  • 40
0

This worked to me:

#!/bin/bash
export LD_LIBRARY_PATH="/usr/lib/jvm/java-7-oracle/jre/lib/amd64"
java -Xmx1024M -Xms512M -cp minecraft.jar net.minecraft.LauncherFrame

I adapted the directory because I use the JAVA by ORACLE. This solved the mystery of the black screen. (:

0

Simple fix, download the .jar file off the minecraft website, move it to your desktop, right click, properties, check make file executable and your done.

Sean
  • 1