If you are an Ubuntu user and you use Java you would benefit from some cool tips I’ve found while browsing the Ubuntu forums of late.
By default Ubuntu comes with a version of Java (jgc) that isn’t Sun’s. This isn’t a problem unless you are perhaps developing Java applications, in that case you might want to install the Sun JDK. This is done easily via the package manager, just search for sun jdk ad pick your version.
Unfortunately despite installing Sun’s jdk the Java system may not be fully utilising it.
java -version in a terminal session will show you the current version in use, and this should be the one you installed from the package manager.
Now try sudo update-alternatives –config java in the terminal.
This should produce a list of installed Java versions and there will be a * by the default one in use. Pick the number that corresponds to the version you want to use (or accept the current default and that will now become the default Java version for Ubuntu.
This can be handy if you want to check your app in different versions of Java or develop to a specific version, or even switch to a different version to troubleshoot environment issues you suspect are Java related.
Technorati Tags: Java, Ubuntu
Powered by ScribeFire.