Best way to set JRE_HOME to Sun's Java on Ubuntu 10.04

view story

http://serverfault.com – I installed Ubuntu 10.04 which by default came with OpenJDK. I've since installed Sun's Java 6 using apt-get. When I type java -version I get: java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode) However, when I start Tomcat it still appears to using Open JDK. Using JRE_HOME: /usr/lib/jvm/java-6-openjdk What's the best way to globally point to Sun's Java? Is there a way to uninstall Open JDK? (HowTos)