Moving from Sun's JVM to openJdk
I wanted to get my entire server running on open source today. So i have Ubuntu, Apache2, Php, MySql, Apache-Tomcat, and OpenBlueDragon however i was running on Sun's JVM obviously this is not open source. Switching over was relatively painless.
Grabbed the latest openjdk from the ubuntu repository:
sudo apt-get install openjdk-6-jre
Made sure it was installed:
sudo update-java-alternatives -l
Switched ubuntu to use the openjdk instead of sun's:
update-java-alternatives -s java-6-openjdk
Then checked the version i was running:
java -version
Everything looked good, i restarted tomcat and went to my blog (running BlogCFC) and received this ugly error: "Probable fatal error:No fonts found"
This seemed strange, but then like a bone-head i forgot to change my $JAVA_HOME variables to point to the openjdk instead of sun.
Which meant editing my .bashrc file:
sudo nano ~/.bashrc
and changing this:
export JAVA_HOME=/usr/lib/jvm/java-6-sun
to this:
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
and finally (incase i ever have to restart the server), change the init.d tomcat script:
sudo nano /etc/init.d/tomcat
to have the same JAVA_HOME:
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
Restarted tomcat and imagine that, BlogCFC loaded up without the font error.
Lesson learned, change your java virtual machine, change your JAVA_HOME pointers...duh!
except for a few bone-head errors
