Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

Minecraft fails to launch on FreeBSD with Sun JDK


  • Please log in to reply
22 replies to this topic

#1

okeeblow
    okeeblow

    Out of the Water

  • Members
  • 5 posts

Posted 10 September 2010 - 03:49 AM

Hello all, I'm trying to get Minecraft working on my computer.

I'm running FreeBSD 8.1-amd64 with the latest NVidia driver and Sun Java:

[nicole@Emi#Desktop]java -version
java version "1.6.0_03-p4"
Java(TM) SE Runtime Environment (build 1.6.0_03-p4-nicole_17_aug_2010_02_15-b00)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_03-p4-nicole_17_aug_2010_02_15-b00, mixed mode)

When I run the game and try to log in, I get this screen and console output:

Posted Image

[nicole@Emi#Desktop]java -jar Minecraft.jar
Username is 'okeeblow'
java.lang.NullPointerException
	at net.minecraft.GameUpdater.fatalErrorOccured(GameUpdater.java:766)
	at net.minecraft.GameUpdater.loadJarURLs(GameUpdater.java:193)
	at net.minecraft.GameUpdater.run(GameUpdater.java:212)
	at net.minecraft.Launcher$1.run(Launcher.java:73)
Fatal error occured (2): null
java.lang.NullPointerException
	at net.minecraft.GameUpdater.fatalErrorOccured(GameUpdater.java:766)
	at net.minecraft.GameUpdater.loadJarURLs(GameUpdater.java:193)
	at net.minecraft.GameUpdater.run(GameUpdater.java:212)
	at net.minecraft.Launcher$1.run(Launcher.java:73)

Any help would be appreciated, since search didn't turn up anything :P

Register or log in to remove.

#2

boran_blok
    boran_blok

    Lapis Lazuli Collector

  • Members
  • 936 posts

Posted 10 September 2010 - 08:30 AM

your java is outdated. you have "1.6.0_03-p4" and the latest is "1.6.0_21-something"
go to www.java.com and update your java first.
Minecraft does not run? Check the alpha Hardware Requirements
Update your drivers for Intel, ATI and nVidia
Getting the message "Customized computer manufacturer graphics driver is detected" ? Use the workaround described here

#3

okeeblow
    okeeblow

    Out of the Water

  • Members
  • 5 posts

Posted 10 September 2010 - 01:37 PM

That's the newest version that's in Ports, unfortunately. Does anyone have any experience with OpenJDK and Minecraft? Google is returning conflicting reports of success and failure with that.

#4

boran_blok
    boran_blok

    Lapis Lazuli Collector

  • Members
  • 936 posts

Posted 10 September 2010 - 01:39 PM

OK ignore whatever advice I was giving. Did not notice that you were talking about a FreeBSD config.
The evrsion I mentioned is the latest windows version. I do not know how synshconized the version numbers are over different OSes
Minecraft does not run? Check the alpha Hardware Requirements
Update your drivers for Intel, ATI and nVidia
Getting the message "Customized computer manufacturer graphics driver is detected" ? Use the workaround described here

#5

ns
    ns

    Out of the Water

  • Members
  • 2 posts

Posted 12 September 2010 - 03:37 PM

I can confirm this. Identical error on FreeBSD 8.1-STABLE w/ Sun JDK (same JDK & port version OP is using.) Using the windows version via wine gets further than using the jar, even (though it isn't playable.)

The error occurs after logging in, when the game attempts to update files.

#6

n44777
    n44777

    Out of the Water

  • Members
  • 2 posts

Posted 13 September 2010 - 11:08 PM

Can confirm this as well. FreeBSD 8.0 amd64 with Oracle's OpenJDK 6 and 7 (corresponds to 1.6 and 1.7, respectively).

#7

okeeblow
    okeeblow

    Out of the Water

  • Members
  • 5 posts

Posted 13 September 2010 - 11:34 PM

Using OpenJDK6 instead of sunjdk:
[nicole@Emi#Desktop]java -version
openjdk version "1.6.0"
OpenJDK Runtime Environment (build 1.6.0-b20)
OpenJDK 64-Bit Server VM (build 17.0-b16, mixed mode)


Posted Image
[nicole@Emi#Desktop]java -jar Minecraft.jar 
java.net.SocketException: Invalid argument
	at java.net.PlainSocketImpl.socketConnect(Native Method)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:310)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:176)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:163)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)
	at java.net.Socket.connect(Socket.java:546)
	at java.net.Socket.connect(Socket.java:495)
	at sun.net.NetworkClient.doConnect(NetworkClient.java:178)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:409)
	at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
	at sun.net.www.http.HttpClient.(HttpClient.java:240)
	at sun.net.www.http.HttpClient.New(HttpClient.java:321)
	at sun.net.www.http.HttpClient.New(HttpClient.java:338)
	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:814)
	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:755)
	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:680)
	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:858)
	at net.minecraft.Util.excutePost(Util.java:70)
	at net.minecraft.LauncherFrame.login(LauncherFrame.java:80)
	at net.minecraft.LoginForm$3.actionPerformed(LoginForm.java:61)
	at java.awt.Button.processActionEvent(Button.java:409)
	at java.awt.Button.processEvent(Button.java:377)
	at java.awt.Component.dispatchEventImpl(Component.java:4469)
	at java.awt.Component.dispatchEvent(Component.java:4295)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:604)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

This appears to be a FreeBSD+OpenJDK problem. Using -Djava.net.preferIPv4Stack=true then yields the same failure as before:

[nicole@Emi#Desktop]java -Djava.net.preferIPv4Stack=true -jar Minecraft.jar 
Username is 'okeeblow'
java.lang.NullPointerException
	at net.minecraft.GameUpdater.fatalErrorOccured(GameUpdater.java:766)
	at net.minecraft.GameUpdater.loadJarURLs(GameUpdater.java:193)
	at net.minecraft.GameUpdater.run(GameUpdater.java:212)
	at net.minecraft.Launcher$1.run(Launcher.java:73)
Fatal error occured (2): null
java.lang.NullPointerException
	at net.minecraft.GameUpdater.fatalErrorOccured(GameUpdater.java:766)
	at net.minecraft.GameUpdater.loadJarURLs(GameUpdater.java:193)
	at net.minecraft.GameUpdater.run(GameUpdater.java:212)
	at net.minecraft.Launcher$1.run(Launcher.java:73)


#8

n44777
    n44777

    Out of the Water

  • Members
  • 2 posts

Posted 14 September 2010 - 01:21 AM

okeeblow said:

This appears to be a FreeBSD+OpenJDK problem. Using -Djava.net.preferIPv4Stack=true then yields the same failure as before:

Yeah, definitely. I've had to apply similar ipv6 workarounds for other programs (not just on FreeBSD).

#9

qualal
    qualal

    Newly Spawned

  • Members
  • 1 posts

Posted 26 September 2010 - 03:08 AM

ns: when you said the game was not playable under wine, did you mean similar to what I experienced in virtual box? (see below)

Virtual box will run the minecraft but gameplay is woefully bad. Any attempt to move is so laggy that its virtually impossible not to overshoot by miles every time you want to look at something or move somewhere. Either that, or you play the game as if you are controlling the mars rovers and wait 10 seconds after every keystroke/mouse move before contemplating the next.

When trying to play minecraft natively, I have the same problem as everyone above, I am running PCBSD 8.1 (FreeBSD 8.1, KDE 4.4.5) I am also running Java Platform Standard edition version  6 update 7 (build 1.6.0_07-b02)

I can't run the game from the .jar file and I can't launch it in opera or firefox either!

Has anyone managed to get the game running in a browser despite it not working from the .jar file?

For the record here is what happens when I try the jar file:

java minecraft.jar

which results in:

java Minecraft.jar
Exception in thread "main" java.lang.NoClassDefFoundError: Minecraft/jar
Caused by: java.lang.ClassNotFoundException: Minecraft.jar
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)


I get the Fatal Error Occurence (2) message when trying to run the Minecraft.jar file via the following command recommended by the website:

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

and after entering login details I got

Username is 'qualal'
java.lang.NullPointerException
        at net.minecraft.GameUpdater.fatalErrorOccured(GameUpdater.java:767)
        at net.minecraft.GameUpdater.loadJarURLs(GameUpdater.java:194)
        at net.minecraft.GameUpdater.run(GameUpdater.java:213)
        at net.minecraft.Launcher$1.run(Launcher.java:73)
Fatal error occured (2): null
java.lang.NullPointerException
        at net.minecraft.GameUpdater.fatalErrorOccured(GameUpdater.java:767)
        at net.minecraft.GameUpdater.loadJarURLs(GameUpdater.java:194)
        at net.minecraft.GameUpdater.run(GameUpdater.java:213)
        at net.minecraft.Launcher$1.run(Launcher.java:73)

When I try to run the game via browser I get the game name at the top of the page and nothing below it (except for the same background pattern the website has).

Has anyone at all made progress on getting this game to run under BSD?
Can anyone help me get it going on ANY browser (I would even gladly install IE if it worked on that)?

#10

ns
    ns

    Out of the Water

  • Members
  • 2 posts

Posted 02 October 2010 - 09:08 PM

qualal: Via wine, the files update, but the title screen never comes up for me. The program just hangs after updating.

I can't help with you with browser-based play. Sorry.

I am now of the belief that there is a specific dependency on the string 'Linux' *somewhere* prior to files being updated,  which of course will fail on a FreeBSD system.

I can run a minecraft server with no problems on the same box.

#11

ChrisStone

Posted 02 November 2010 - 08:42 PM

Running FreeBSD 8.1-STABLE with Diablo JDK 1.6.0:

Username is 'xxxxxxxxxx'
[Loaded net.minecraft.Launcher$1 from file:/usr/home/chris/Desktop/Minecraft.jar]
[Loaded net.minecraft.Launcher$2 from file:/usr/home/chris/Desktop/Minecraft.jar]
[Loaded net.minecraft.GameUpdater from file:/usr/home/chris/Desktop/Minecraft.jar]
[Loaded net.minecraft.GameUpdater$3 from file:/usr/home/chris/Desktop/Minecraft.jar]
[Loaded net.minecraft.GameUpdater$2 from file:/usr/home/chris/Desktop/Minecraft.jar]
[Loaded java.io.StringWriter from /usr/local/diablo-jdk1.6.0/jre/lib/rt.jar]
[Loaded java.security.AccessControlException from /usr/local/diablo-jdk1.6.0/jre/lib/rt.jar]
[Loaded java.awt.LightweightDispatcher$2 from /usr/local/diablo-jdk1.6.0/jre/lib/rt.jar]
[Loaded java.awt.event.AWTEventListenerProxy from /usr/local/diablo-jdk1.6.0/jre/lib/rt.jar]
[Loaded java.awt.Toolkit$ToolkitEventMulticaster from /usr/local/diablo-jdk1.6.0/jre/lib/rt.jar]
[Loaded javax.swing.Autoscroller from /usr/local/diablo-jdk1.6.0/jre/lib/rt.jar]
[Loaded java.lang.IllegalAccessException from /usr/local/diablo-jdk1.6.0/jre/lib/rt.jar]
[Loaded java.lang.InstantiationException from /usr/local/diablo-jdk1.6.0/jre/lib/rt.jar]
[Loaded LZMA.LzmaInputStream from file:/usr/home/chris/Desktop/Minecraft.jar]
[Loaded LZMA.LzmaException from file:/usr/home/chris/Desktop/Minecraft.jar]
[Loaded java.util.jar.Pack200 from /usr/local/diablo-jdk1.6.0/jre/lib/rt.jar]
java.lang.NullPointerException
	at net.minecraft.GameUpdater.fatalErrorOccured(GameUpdater.java:767)
	at net.minecraft.GameUpdater.loadJarURLs(GameUpdater.java:194)
	at net.minecraft.GameUpdater.run(GameUpdater.java:213)
	at net.minecraft.Launcher$1.run(Launcher.java:73)
Fatal error occured (2): null

I'll do some more digging and see if I can figure out where the null pointer is coming from.

Update:

Little bit of a guess, looks like it's calling the Unpack method and passing a variable that's got a null value. I'm guessing that because I don't see the program try to download any files, it's messing something up during download, and when it goes to unpack, the file isn't there.

#12

jandrese
    jandrese

    Out of the Water

  • Members
  • 7 posts

Posted 06 November 2010 - 08:22 PM

I think this is the offending code:

		String osName = System.getProperty("os.name");
		String nativeJar = null;
		if(osName.startsWith("Win"))
			nativeJar = "windows_natives.jar.lzma";
		else
		if(osName.startsWith("Linux"))
			nativeJar = "linux_natives.jar.lzma";
		else
		if(osName.startsWith("Mac"))
			nativeJar = "macosx_natives.jar.lzma";
		else
		if(osName.startsWith("Solaris") || osName.startsWith("SunOS"))
			nativeJar = "solaris_natives.jar.lzma";
		else
			fatalErrorOccured((new StringBuilder("OS (")).append(osName).append(") not supported").toString(), null);

I'm not sure exactly what's going wrong (is System.getProperty("os.name") broken on FreeBSD)?  It's not spitting out the error I expected, but I'm guessing something in there is returning a null and causing the program to crash before it gets to the fatalErrorOccured at the bottom.  The whole thing is in a try/catch block to Exception.  Exception just calls the stack trace function and then returns (which is why the stack trace is printed twice, the fatalErrorOccured function also calls it.

#13

Oxyd
    Oxyd

    Newly Spawned

  • Members
  • 1 posts

Posted 09 November 2010 - 06:00 PM

I just want to note that Minecraft runs just fine for me under FreeBSD using the Linux Java binary. That is, under linuxulator.

I installed linux-sun-jre-1.6.0.03 from Ports, and created this script:
#!/bin/sh

export JAVA_HOME=/usr/local/linux-sun-jre1.6.0
java -jar Minecraft.jar

And I can now play Minecraft on FreeBSD by running this script!

#14

dextro_
    dextro_

    Tree Puncher

  • Members
  • 14 posts

Posted 13 November 2010 - 08:35 PM

Oxyd could you do me a favor and try and run the minecraft server? I am getting a new dedicated server and really wany FreeBSD but if I can't host a MC server on it I am going to go Arch Linux.

#15

jandrese
    jandrese

    Out of the Water

  • Members
  • 7 posts

Posted 07 December 2010 - 02:09 AM

FWIW, the Linux-sun-jre16 port got further for me, but still failed to actually start the game.  This time it took the login, downloaded the .so files, but then failed to link them in for some reason:

Looking at the directory, it seems that those .so files are there, so I'm not sure what the problem is.  It did barf earlier on not being able to find 'javaw', but I'm not sure if that is important or not.  

Exception in thread "Minecraft main thread" java.lang.UnsatisfiedLinkError: Can't load library: /home/jandrese/.minecraft/bin/natives/liblwjgl.so
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.load0(Unknown Source)
        at java.lang.System.load(Unknown Source)
        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.(Sys.java:98)
        at org.lwjgl.opengl.Display.(Display.java:132)
        at net.minecraft.client.Minecraft.a(SourceFile:149)
        at net.minecraft.client.Minecraft.run(SourceFile:559)
        at java.lang.Thread.run(Unknown Source)

Update: I tried linking java to javaw just for the heck of it.  Now the game doesn't spit out errors, but the script exists with just "Killed", suggesting a segfault or something.  Interestingly, the login window thread stays running, so I can send my name and password, but when I hit login it flashes up a loading screen for a split second, then just black.

#16

jandrese
    jandrese

    Out of the Water

  • Members
  • 7 posts

Posted 09 December 2010 - 05:14 PM

Also, the minecraft server works fine for me in FreeBSD.  

I start the server with

#!/bin/sh

java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

Clients are able to connect normally and it seems to run fine.  It's a bit more resource intensive than I expected, but as I understand it that is normal.

#17

okeeblow
    okeeblow

    Out of the Water

  • Members
  • 5 posts

Posted 14 December 2010 - 06:43 AM

Oh yeah, I had success with linux-sun-jdk16 a few months ago. Sorry I forgot to post here about it.

#18

floydoss
    floydoss

    Out of the Water

  • Members
  • 2 posts

Posted 12 June 2011 - 03:36 PM

just wanted to know, i also get this error on windows 7 minecraft but i have fully updated java and reinstalled it and my drivers r up to date i would like to get some help with this?

#19

NalydRelwof
  • Location: 1 Block above lava hoping the Linux Minecraft input libraries don't decide to spaz out.

Posted 20 July 2011 - 06:30 PM

I am also having these issues with PC-BSD 8.2 "Hubble".  I have a couple questions about your procedure, did you first remove your BSD version of Java?  Second, how would I go about installing the Linux version from Ports (I am new to BSD from Linux)?  This is probably a dead thread, but any help would be appreciated.

BTW: Floydoss, I don't think you'll find help on a Windows problem on a BSD thread, especially one that seems to be dead.

Edit: I am encountering jandrese's problems, and in a PM he stated that he has had no luck in solving them.
Don't make me get my creeper army!

#20

bgalakazam
  • Location: California, USA

Posted 05 December 2011 - 06:41 AM

By the way, while the devs are too busy getting rich and have no time to support one of the most stable and awesome OS out there, FreeBSD, you can try Minetest. It's a free and open-source clone of Minecraft.

I am sad that I paid and cannot play the game. I thought the whole point to java was to be cross-platform. Yet the devs didn't choose OpenJDK.