• Home
  • Blogger
  • Github
  • Travel
  • The Tank Project
skip to main | skip to sidebar

Steven Occhipinti

A braindump.

Minecraft exception in linux


I finally decided to install Minecraft on my new shiny Toshiba Portege z830.
Ubuntu ships with an open-source version of Java, which did run Minecraft, but the graphics were terrible, even on the lowest settings. There were artefacts everywhere!

So as recommended, I switched to the official JRE, but now the login screen works, but that's about it. After logging in, I just got a black screen and the following exception in the console:


Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError at net.minecraft.client.Minecraft.a(SourceFile:180) at net.minecraft.client.Minecraft.run(SourceFile:648) at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 at org.lwjgl.opengl.XRandR$Screen.<init>(XRandR.java:234) at org.lwjgl.opengl.XRandR$Screen.<init>(XRandR.java:196) at org.lwjgl.opengl.XRandR.populate(XRandR.java:87) at org.lwjgl.opengl.XRandR.access$100(XRandR.java:52)at org.lwjgl.opengl.XRandR$1.run(XRandR.java:110) at java.security.AccessController.doPrivileged(Native Method) at org.lwjgl.opengl.XRandR.getConfiguration(XRandR.java:108) at org.lwjgl.opengl.LinuxDisplay.init(LinuxDisplay.java:618) at org.lwjgl.opengl.Display.<clinit>(Display.java:135)
... 3 more

After discussing the problem in IRC, the solution was quite simple. It turns out "lwjgl" is a "Light Weight Java Game Library" and the version I had wasn't behaving.
On the advice of the helpful IRC'ers, I downloaded the latest "lwjgl" from here (which at time of writing is 2.8.3) to get it all to work nicely.

To install it, I downloaded the zip file, extracted it to a temporary directory, then copied across these files:
cp lwjgl-2.8.3/jar/lwjgl.jar ~/.minecraft/bin
cp lwjgl-2.8.3/native/linux/* ~/.minecraft/bin/natives
Done! Now it works nicely.
Posted by Steve at 23:25
Labels: java , linux , minecraft , ubuntu Email This BlogThis! Share to X Share to Facebook

20 comments:

Dunks said...

Hello, I've just encountered the same problem and tried your fix, but it didn't seem to work at first.

I then noticed then you said to copy from lwjgl-2.8.3/native/linux/* into ~/.minecraft/bin/native. But it's actually ~/.minecraft/bin/natives , note 'natives'.

This is using the latest MC version as of posting.

18 February 2012 at 23:45
Steve said...

Thank you Dunks!

My mistake, I've updated the post.

Cheers

19 February 2012 at 11:40
kasmanit said...

Thanks a lot

17 April 2012 at 02:55
Anonymous said...

Thanks a lot for this post. Fixed my problem.

4 June 2012 at 05:49
Unknown said...

Helped me out too, thanks so much.

5 June 2012 at 05:19
Steve said...

Great! Appreciate the feedback, thanks!

5 June 2012 at 11:18
David Huttleston Jr said...

Sweet, thanks for the fix!

7 June 2012 at 06:40
Anonymous said...

Wow, after hours of searching, this was indeed the solution of my problem. Thanx!

25 July 2012 at 23:52
Anonymous said...

This problem was haunting me for a while now... Im running my system from USB as i dont want to leave traces on the system and so i didnt want to run regular Ubuntu as Gnome is too heavy. Minecraft worked perfectly fine under Ubuntu, but not under Xubuntu..

This solved it for me! :D

Thank you sir.

28 July 2012 at 02:04
Anonymous said...

Been fighting with Minecraft for 2 days on xubuntu trying to run it, finally came across this post and WOW got it running right away. The 5000 internets shall be delivered to your account posthaste.

6 August 2012 at 05:54
Steve said...

Glad this is useful, thanks for the great feedback everyone! Really appreciate it!

6 August 2012 at 09:14
Anonymous said...

Thanks

23 December 2012 at 11:54
Ian Kropp said...

Bless your heart! Made my night!

20 February 2013 at 15:31
Anonymous said...

This worked perfectly! Thanks!

24 March 2013 at 04:46
Anonymous said...

Thank you !!

27 March 2013 at 06:35
Anonymous said...

Thanks!

29 March 2013 at 20:57
Anonymous said...

This problem has been winding me up for just over 3 days now, but thanks to you, problem solved :)
you sir, are a legend :)

1 April 2013 at 00:30
Steve said...

Thanks for the great feedback! :)
Glad to hear it's helping people!

2 April 2013 at 08:40
Anonymous said...

Thanks alot! I don't understand why this is needed in the first place, but thanks alot for giving us the solution!

This should be reported to the devs, shouldn't it?

13 April 2013 at 02:38
Anonymous said...

Thank you very much! :)

22 April 2013 at 08:26

Post a Comment

Newer Post Older Post Home

Blog Archive

  • ►  2013 (4)
    • ►  June (1)
    • ►  May (1)
    • ►  March (1)
    • ►  January (1)
  • ▼  2012 (17)
    • ►  December (1)
    • ►  October (1)
    • ►  September (2)
    • ►  August (2)
    • ►  July (1)
    • ►  May (2)
    • ►  April (2)
    • ►  March (3)
    • ▼  February (3)
      • Git + Hub = GitHub
      • Copy and Paste over SSH with Xclip
      • Minecraft exception in linux
  • ►  2011 (33)
    • ►  December (1)
    • ►  November (3)
    • ►  October (3)
    • ►  September (4)
    • ►  August (3)
    • ►  July (4)
    • ►  June (6)
    • ►  May (6)
    • ►  April (3)

Labels

android (5) apache (1) arch linux (1) arduino (1) bash (11) calendar (1) compiz (1) design (1) diff (1) email (1) gimp (1) git (3) github (2) gnome3 (1) Google (2) hacking (1) hardware (4) howto (1) htpc (1) java (1) lamp (1) linux (28) Mac (2) minecraft (2) mysql (1) netduino (1) nfs (1) parallel port (1) patch (1) photography (4) php (1) pidgin (2) printer (1) programming (6) python (1) rails (1) regex (5) review (3) ruby (3) Samsung Galaxy S3 (2) Samsung Series 9 (1) security (1) sed (3) ssh (1) sudo (1) tank (2) Toshiba Portege (1) troubleshooting (1) ubuntu (16) ui (2) unity (2) vim (5) webcam (1) websites (3) xbmc (1) xclip (1) xul (1)

Total Pageviews

Sparkline
 
Copyright (c) 2010 Steven Occhipinti. Designed by Conveyancing
High Deductible Health Insurance, Purchase Beats