Thursday, May 24, 2007

BEA JRockit on Ubuntu

I've decided to play around with Ubuntu again today using 7.04 (Feisty) desktop running VMWare Server with a 6.06 LTS server running as a guest. I wanted to get Tomcat working and was able to do so with the Sun JDK6. I also tried to get the examples to work under BEA's JRockit accelerated Java VM and here is how I installed it:

sudo -s
wget http://download2.bea.com/pub/jrockit/60/jrockit-R27.2.0-jdk1.6.0-linux-ia32.bin
chmod +x jrockit-R27.2.0-jdk1.6.0-linux-ia32.bin
./jrockit-R27.2.0-jdk1.6.0-linux-ia32.bin -mode=console

I answered the following to the prompts


1
2
/usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0


Next, I created a symbolic link for the JRocket folder (Ubuntu does this for the Sun Java and GCJ alternatives). I also updated all the "alternatives" used by Debian systems.

ln -s /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0 /usr/lib/jvm/java-6-jrockit
update-alternatives --install /usr/bin/appletviewer appletviewer /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/appletviewer 64
update-alternatives --install /usr/bin/apt apt /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/apt 64
update-alternatives --install /usr/bin/extcheck extcheck /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/extcheck 64
update-alternatives --install /usr/bin/idlj idlj /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/idlj 64
update-alternatives --install /usr/bin/jarsigner jarsigner /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jarsigner 64
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/javac 64
update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/javadoc 64
update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/javah 64
update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/javap 64
update-alternatives --install /usr/bin/java-rmi.cgi java-rmi.cgi /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/java-rmi.cgi 64
update-alternatives --install /usr/bin/jconsole jconsole /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jconsole 64
update-alternatives --install /usr/bin/jdb jdb /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jdb 64
update-alternatives --install /usr/bin/jps jps /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jps 64
update-alternatives --install /usr/bin/jrunscript jrunscript /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jrunscript 64
update-alternatives --install /usr/bin/jstat jstat /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jstat 64
update-alternatives --install /usr/bin/jstatd jstatd /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jstatd 64
update-alternatives --install /usr/bin/native2ascii native2ascii /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/native2ascii 64
update-alternatives --install /usr/bin/rmic rmic /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/rmic 64
update-alternatives --install /usr/bin/schemagen schemagen /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/schemagen 64
update-alternatives --install /usr/bin/serialver serialver /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/serialver 64
update-alternatives --install /usr/bin/wsgen wsgen /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/wsgen 64
update-alternatives --install /usr/bin/wsimport wsimport /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/wsimport 64
update-alternatives --install /usr/bin/xjc xjc /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/xjc 64
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/java 64
update-alternatives --install /usr/bin/keytool keytool /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/keytool 64
update-alternatives --install /usr/bin/orbd orbd /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/orbd 64
update-alternatives --install /usr/bin/pack200 pack200 /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/pack200 64
update-alternatives --install /usr/bin/policytool policytool /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/policytool 64
update-alternatives --install /usr/bin/rmid rmid /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/rmid 64
update-alternatives --install /usr/bin/servertool servertool /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/servertool 64
update-alternatives --install /usr/bin/tnameserv tnameserv /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/tnameserv 64
update-alternatives --install /usr/bin/unpack200 unpack200 /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/unpack200 64
update-alternatives --set appletviewer /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/appletviewer
update-alternatives --set apt /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/apt
update-alternatives --set extcheck /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/extcheck
update-alternatives --set idlj /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/idlj
update-alternatives --set jarsigner /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jarsigner
update-alternatives --set javac /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/javac
update-alternatives --set javadoc /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/javadoc
update-alternatives --set javah /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/javah
update-alternatives --set javap /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/javap
update-alternatives --set java-rmi.cgi /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/java-rmi.cgi
update-alternatives --set jconsole /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jconsole
update-alternatives --set jdb /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jdb
update-alternatives --set jps /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jps
update-alternatives --set jrunscript /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jrunscript
update-alternatives --set jstat /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jstat
update-alternatives --set jstatd /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jstatd
update-alternatives --set native2ascii /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/native2ascii
update-alternatives --set rmic /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/rmic
update-alternatives --set schemagen /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/schemagen
update-alternatives --set serialver /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/serialver
update-alternatives --set wsgen /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/wsgen
update-alternatives --set wsimport /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/wsimport
update-alternatives --set xjc /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/xjc
update-alternatives --set java /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/java
update-alternatives --set keytool /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/keytool
update-alternatives --set orbd /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/orbd
update-alternatives --set pack200 /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/pack200
update-alternatives --set policytool /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/policytool
update-alternatives --set rmid /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/rmid
update-alternatives --set servertool /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/servertool
update-alternatives --set tnameserv /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/tnameserv
update-alternatives --set unpack200 /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/unpack200
update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jar 64
update-alternatives --install /usr/bin/rmiregistry rmiregistry /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/rmiregistry 64
update-alternatives --set jar /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/bin/jar
update-alternatives --set rmiregistry /usr/lib/jvm/jrockit-R27.2.0-jdk1.6.0/jre/bin/rmiregistry

I'm sure there are other things I still need to do like all the environment variables and a path but this is a good start and everything I've tried under Tomcat has worked.

1 comment:

Jason said...

Thanks for the useful post. Do you have any updates for this for
Ubuntu 10.10 Meerkat and JRockit R28.1 32 bit. Thanks