Anyways, getting this baby to run was a long and arduous process (as have been most java programs on Ubuntu). However, there's always that one quick and simple solution that you've never known about which makes that horrible task easy as pie. And I believe I have found it. When running Risk, I noticed that for some reason it's broken in Java 1.4.2. However, for Java 5 and 6, it works perfectly. From the graphical perspective, it's easy to run a .jar file with a different compiler, just right click and select "Run with Sun Java 6". However, from the command line, I've always been plagued that the "java" command brings up the 1.4.2 compiler. I've searched everywhere in vain for a solution to this, because the typical process of linking the binary to the /usr/bin folder didn't exactly work, and something always went wrong. Well, I gave up for a while, until about, ohhhh..... twenty minutes ago. Then I decided to do a search on the Ubuntu forums, and sure enough, someone found a way to switch the compilers. And I'm going to show you how to do it now.
It's all done with a nifty tool called update-java-alternatives. Now, in order to use update-java-alternatives, you'll need to be root, so prepare your "sudo"s. Probably the first thing you want to do is check out what types of Java you have, you do that by typing
sudo update-java-alternatives -l
This will show you what different compilers you have. Here's an example from my computer:
java-1.5.0-sun 53 /usr/lib/jvm/java-1.5.0-sunI'll show you how to change it to Java 6. As you can see, the name for Java 6 is "java-6-sun". So basically all you have to do is type
java-6-sun 63 /usr/lib/jvm/java-6-sun
java-gcj 1041 /usr/lib/jvm/java-gcj
sudo update-java-alternatives -s java-6-sunAnd voila! Your compiler and libraries will all change to Java 6. Now, if I ever get stuck again, be sure to point me to this post. And I hope this was useful to you all too.