jvm.cfg error on Debian 5.0.5(lenny)

An application required Java 1.6 and therefore I installed
aptitude -y install sun-java6-bin sun-java6-fonts sun-java6-jdk sun-java6-jre

The package installation went fine but on trying to find out the version, it gave an error:

/usr/lib/jvm/java-6-sun/bin/java -version
Error: could not open `/usr/lib/jvm/java-6-sun-’

Quick google didn’t give me much information on this issue and therefore, I uninstalled the packages:
aptitude -y purge sun-java6-bin sun-java6-fonts sun-java6-jdk sun-java6-jre

Next step was to download the JDK package from Oracle’s website and the following worked:
wget -c “http://download.oracle.com/auth/otn-pub/java/jdk/6u26-b03/jdk-6u26-linux-x64.bin?e=1308359002&h=acd3b00c757c2d4726c455c0ba0185c5” -O jdk-6u26-linux-x64.bin

chmod u+x jdk-6u26-linux-x64.bin && ./jdk-6u26-linux-x64.bin && mv jdk1.6.0_26/ /usr/lib/jvm/ && ln -s /usr/lib/jvm/jdk1.6.0_26 /usr/lib/jvm/java-6-sun

Soft link to java-6-sun is option, I created it as I didn’t want to change the $JAVA_HOME in my users’s profile.

6 thoughts on “jvm.cfg error on Debian 5.0.5(lenny)

Leave a Reply

Your email address will not be published. Required fields are marked *