Wednesday, June 19, 2013

Install JDK1.4.2(32bit) on Ubuntu 12.04 LTS(64bit)

Here is an error occurred if installed directly:
install.sfx.XXX: not found

Solution:

  • install g++-mltilib and JDK

    $ sudo apt-get install g++-multilib  
    $ chmod +x j2sdk-1_4_2_19-linux-i586.bin  
    $ ./j2sdk-1_4_2_19-linux-i586.bin
    .....
    Do you agree to the above license terms? [yes or no]
    yes
    Unpacking...
    Checksumming...
    0
    0
    Extracting...
    UnZipSFX 5.40 of 28 November 1998, by Info-ZIP (Zip-Bugs@lists.wku.edu).
       creating: j2sdk1.4.2_19/
       creating: j2sdk1.4.2_19/jre/
       creating: j2sdk1.4.2_19/jre/bin/
      inflating: j2sdk1.4.2_19/jre/bin/java
      inflating: j2sdk1.4.2_19/jre/bin/keytool
      inflating: j2sdk1.4.2_19/jre/bin/policytool
    ....
    Creating j2sdk1.4.2_19/lib/tools.jar
    Creating j2sdk1.4.2_19/jre/lib/rt.jar
    Creating j2sdk1.4.2_19/jre/lib/jsse.jar
    Creating j2sdk1.4.2_19/jre/lib/charsets.jar
    Creating j2sdk1.4.2_19/jre/lib/ext/localedata.jar
    Creating j2sdk1.4.2_19/jre/lib/plugin.jar
    Creating j2sdk1.4.2_19/jre/javaws/javaws.jar
    Done.  
    $ sudo mkdir -p /usr/lib/jvm  
    $ sudo mv j2sdk1.4.2_19 /usr/lib/jvm/java-1.4.2_19
  • Java environment configuration.

    $ wget http://webupd8.googlecode.com/files/update-java-0.5b  
    $ chmod +x update-java-0.5b
    $ sudo ./update-java-0.5b  

    Select java-1.4.2_19

    Check java version

    $ java -version
    java version "1.4.2_19"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_19-b04)
    Java HotSpot(TM) Client VM (build 1.4.2_19-b04, mixed mode)  

No comments:

Post a Comment