Using GAlternatives is fun, tasty

G Alternatives screenshot

If you’ve got a raw Ubuntu box it probably came with gij, the GNU Java runtime interpreter. If you’ve installed Sun’s JDK using sudo apt-get install sun-java5-jdk then you’ll now have Sun’s runtime but gij will still be the default. This is maintained by the alternatives system. You can either go and fix it yourself or you can sudo apt-get install galternatives followed by galternatives to run it (I haven’t noticed it in any menu although of course you can add it yourself).

This gives you a nice GUI onto all of the currently set commands in /etc/alternatives and what they can be set to. If you scroll down the list you’ll need to change the settings for jar and java.