Symptoms:
- Running minecraft alpha with java -jar Minecraft.jar would hang with a black screen after submitting Minecraft.net credentials. A stack trace would be produced in terminal:

Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError
at net.minecraft.client.Minecraft.a(SourceFile:148)
at net.minecraft.client.Minecraft.run(SourceFile:554)
at java.lang.Thread.run(Thread.java:619)
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

Cause:
This issue in my case seems to be caused (as i could determine from googling) because the game engine Light Weight Java Game Library (lwjgl) calling xrandr to determine screen resolution and failing when parsing lines due to a bad regex in XRandR.java. It would expect lines like this:

According to a forum post on lwjgl's forums the issue was identified, a patch was made, and committed back into the project. Apparently, the lwjgl version that is distruted with minecraft is out of date and does not include this patch.

Solution:
Install the latest version of the game engine.

Procedure:
[*:34q0aij6] Make sure minecraft alpha has been run at least once so it can download the gamedata.
[*:34q0aij6] Download the latest version of the game engine: http://sourceforge.net/projects/java-game-lib/files/Official%20Releases/LWJGL%202.5/lwjgl-2.5.zip/download
[*:34q0aij6] Open zip file in Archive Manager and open jar/ directory
[*:34q0aij6] Navigate to the minecraft game data directory in nautilus: /home/user/.minecraft/bin
[*:34q0aij6] Drag jinput.jar lwjgl.jar lwjgl_util.jar from the archive to the minecraft gamedata directory
[*:34q0aij6] Open native/linux/ in the archive
[*:34q0aij6] navigate to /home/user/.minecraft/bin/natives
[*:34q0aij6] Drag everything from native/linux/ to /home/user/.minecraft/bin/natives
[*:34q0aij6] Your done! Start the game!

This has happened to me after the last update. I have Lenovo Thinkpad, but am running Windows, not Linux. I tried carrying out your instructions, except using the files and folders relevant to Windows, but unfortunately it did not work.

Salieri, you said you had to delete your .minecraft folder? Did you then reinstall the game, and then replace the files listed in the OP?

Does this happen to work with any other types of comptuer? Such as Windows 7? I'm looking for a solution everywhere...

Rollback Post to RevisionRollBack

Present to me danger.
Present to me a real element.
Show me your power. Show me what it is that makes you so fierce.
Is this all you've got, dear Nether?
Is this all you've got?Click me! Save the slimes!

Finally something that worked! Will this forever be a problem or do you think that when Minecraft updates that they will update these.... things.

THANK YOU SO MUCH!

NP! This will be a problem as long as Mojang Specifications doesn't include an updated version of lwgl with Minecraft.

Quote from Salieri »

After the update I had to delete my .minecraft (backed up saves) and had to do this all over again.
I was getting the black screens again.

Indeed. Every minecraft update re-downloads ALL files in the .minecraft/bin directory, thus eradicating the fix. A solution would be to have a directory outside with the files ready to go, and a quick bash script that you can run each time you redownload an update so getting back into MC isn't as painful. I'm thinking like:

[*:1osm6e25]Extract lwgl files to a directory like ~/minecraft-engine. NoviceTip: in command line the tilde character ~ is a shortcut for the currently logged in user's home directory. Usually /home/[username]. So making a directory called ~/minecraft-engine would in reality mean create /home/[username]/lwgl
[*:1osm6e25] Make a text file on your desktop or whereever you can have easy access when you need to overwrite the game engine called 'fixminecraft.sh' or whatever the hell you want to call it (name doesn't matter) and copy/paste the following into the file:

to make it executable
[*:1osm6e25]CONGRATULATIONS you should now have an easy script that quickly fixes Minecraft after an update. (Hopefully)

Quote from TheMusicGirl »

Does this happen to work with any other types of comptuer? Such as Windows 7? I'm looking for a solution everywhere...

It can't hurt to try. Since it's java you can actually use the same download that linux would use except instead your minecraft folder is located in %APPDATA%\.minecraft\ (just hit windows key +R and copy paste that thing into it and hit run... it will open the minecraft install directory. Also (very important), instead of copying the stuff out of /native/linux in the zip you would copy the .dlls out of /native/windows (or whatever its called.. the only windows-related directory in the /native directory!) and put them inside you .minecraft\bin\natives folder. This will effectively upgrade your windows engine version. If it doesnt work or something breaks, you can delete the .minecraft\bin directory and re-run minecraft.exe. It will re-download the default program files.

I am also using a thinkpad with Ubuntu. I have a separate monitor attached and was extending the display. When I switch the second monitor off through the system > preferences route, minecraft resulted in a black screen after logging in. Turning the secondary display back on allows minecraft to run properly.