Now, Java on FreeBSD is a wonky thing. It was never officially supported by Sun and/or Oracle. There are two native ports, but neither works 100% of the time, and the official Linux JDK/JRE can be run in compat mode, but it's also problematic. Now, I seem to recall that when I started playing well over a year ago, I could play on my old FreeBSD 8.x desktop, even though it was graphically unpleasant, but I could be wrong. The client now won't work with either the diablo-jdk1.6, diablo-jre1.6, or jdk1.6 Java ports. The launcher will start, but after logging in, the window shows the error "Failed to launch / Fatal error occurred (2): null" and nothing further happens. (Someone running PC-BSD 9 has the same issue, so it's not just me and not just vanilla FreeBSD.) I don't know enough about Java to know if that's a bug on the FreeBSD JDK1.6 end or on the Minecraft end, but either way, there's no game-playing joy.
Now, I don't really care, since I mostly play Minecraft on my linux craptop, but that academic curiosity kicked in. There's still the Linux JDK, which is a bigger pain in the ass to set up, but I finally got around to it, and it seems to work.1
How to Run the Minecraft Client on FreeBSD
(This should also work on PC-BSD 9, although (a) I haven't tested it, but (b) you will need to take additional steps to set up the traditional FreeBSD ports tree.)
- Install the following ports. (Make sure you /usr/ports tree is up to date! You've run cvsup with a good ports config, right!?2) I'm hardcore and eschew installing the pre-compiled packages in general, but since Sun's Java has specific licensing terms, you can't install it as a package anyway, so just bite the bullet, set up the ports tree, and have at it.
- linux-f10-dri -- May be optional in some environments, I'm not sure, but install it if you get libGL not found errors
- Make sure the linux kernel module is loaded. As root: "kldload linux"
- Make sure the linux proc filesystem is mounted. As root: "mount -t linprocfs linprocfs /compat/linux/proc"
- Since you need to set up a couple environmental variables that you won't normally want set, I suggest making a dinky startup script:
$ cat runmc
java -cp minecraft.jar net.minecraft.LauncherFrame
- Get the Linux minecraft client jar file from minecraft.net and then have at it.
1When I tried to run the client on my FreeBSD 9 desk top, which I had logged into over ssh with X11 forwarding on from my linux laptop, the client started, but after I logged in (the point where it starts the game launcher), I'd get the error "org.lwjgl.LWJGLException: Could not choose GLX13 config" However, if I try to play Minecraft on the FreeBSD box's local display, it works, and since I can also run Minecraft locally on the linux craptop, I assume it's some issue with X11 forwarding. Since I don't plan on playing remotely normally, it's not an issue for me.
2This is the ports-supfile I use, sans comments:
*default release=cvs tag=.
*default delete use-rel-suffix