Back so soon, yeah I know …
Another issue that I came across regarding Java. In my day to day work my major application is dependent on Java and it cannot be IcedTea or the java-gcj version. It really has to be Sun version.
At first I was thinking it would be a nightmare, but after searching a bit I found what I was looking for. In a way of compiling the big information, here it goes what I’ve done to install it and configure it properly in my system
1. step -> Download java JDK rpm file.
at the time of this writing: jdk-6u20-linux-x64-rpm.bin
2. step – Install the rpm file, it’s going to install several rpm actually
# chmod +x jdk-6u20-linux-x64-rpm.bin
The java will be installed at: /usr/java
lrwxrwxrwx. 1 root root 16 May 6 15:32 default -> /usr/java/latest
drwxr-xr-x. 9 root root 4096 May 6 15:32 jdk1.6.0_20
lrwxrwxrwx. 1 root root 21 May 6 15:32 latest -> /usr/java/jdk1.6.0_20
After this you will need to configure the alternatives to recognize the new java version installed. I’ve saved a file with all that is needed, or at least for all that I need.
/usr/sbin/alternatives –install /usr/bin/java java /usr/java/latest/bin/java 20000 \
–slave /usr/bin/javaws javaws /usr/java/latest/bin/javaws \
–slave /usr/bin/keytool keytool /usr/java/latest/bin/keytool \
–slave /usr/bin/orbd orbd /usr/java/latest/bin/orbd \
–slave /usr/bin/rmid rmid /usr/java/latest/bin/rmid \
–slave /usr/bin/rmiregistry rmiregistry /usr/java/latest/bin/rmiregistry \
–slave /usr/bin/servertool servertool /usr/java/latest/bin/servertool \
–slave /usr/bin/tnameserv tnameserv /usr/java/latest/bin/tnameserv \
–slave /usr/bin/pack200 pack200 /usr/java/latest/bin/pack200 \
–slave /usr/lib/jvm/jre jre /usr/java/latest/jre \
–slave /usr/bin/unpack200 unpack200 /usr/java/latest/bin/unpack200
You can now choose what version of java you want to use by issuing the command:
# alternatives –config java
There are 3 programs which provide ‘java’.
*+ 3 /usr/java/latest/bin/java
Hope it helps anyone out there.