First, download the required packages:
wget http://de.archive.ubuntu.com/ubuntu/pool/multiverse/s/sun-java5/{ia32-sun-java5-bin_1.5.0-22-0ubuntu0.8.04_amd64.deb,sun-java5-bin_1.5.0-22-0ubuntu0.8.04_amd64.deb,sun-java5-demo_1.5.0-22-0ubuntu0.8.04_amd64.deb,sun-java5-jdk_1.5.0-22-0ubuntu0.8.04_amd64.deb,sun-java5-jre_1.5.0-22-0ubuntu0.8.04_all.deb}
Now, install them with dpkg -i:
dpkg -i ia32-sun-java5-bin_1.5.0-22-0ubuntu0.8.04_amd64.deb sun-java5-bin_1.5.0-22-0ubuntu0.8.04_amd64.deb sun-java5-demo_1.5.0-22-0ubuntu0.8.04_amd64.deb sun-java5-jdk_1.5.0-22-0ubuntu0.8.04_amd64.deb sun-java5-jre_1.5.0-22-0ubuntu0.8.04_all.deb
You will get unresolved dependency problems, but we are going to fix them:
aptitude full-upgrade
Keep pressing
n
until aptitude doesn't want to remove or downgrade any packages, only install. The solution will look like this:
The following actions will resolve these dependencies:
Install the following packages:
ia32-libs [2.7ubuntu25 (lucid)]
lib32asound2 [1.0.22-0ubuntu7 (lucid)]
lib32bz2-1.0 [1.0.5-4 (lucid)]
lib32gcc1 [1:4.4.3-4ubuntu5 (lucid)]
lib32ncurses5 [5.7+20090803-2ubuntu3 (lucid)]
lib32stdc++6 [4.4.3-4ubuntu5 (lucid)]
lib32v4l-0 [0.6.4-1ubuntu1 (lucid)]
lib32z1 [1:1.2.3.3.dfsg-15ubuntu1 (lucid)]
libc6-i386 [2.11.1-0ubuntu7.1 (lucid-updates, lucid-security)]
odbcinst [2.2.11-21 (lucid)]
odbcinst1debian1 [2.2.11-21 (lucid)]
unixodbc [2.2.11-21 (lucid)]
Score is -58
After accepting the solution and installing the missing packages, you will have both 32 and 64bit sun java5 installed:
# update-alternatives --list java
/usr/lib/jvm/ia32-java-1.5.0-sun/jre/bin/java
/usr/lib/jvm/java-1.5.0-sun/jre/bin/java
/usr/lib/jvm/java-6-openjdk/jre/bin/java
And you can use one of these values, as
JAVA_HOME
:
# java 1.5 32bit:
JAVA_HOME="/usr/lib/jvm/ia32-java-1.5.0-sun"
# java 1.5 64bit:
JAVA_HOME="/usr/lib/jvm/java-1.5.0-sun"
# java 1.6 64bit:
JAVA_HOME="/usr/lib/jvm/java-6-sun"
No comments:
Post a Comment