1

I want to install Java JRE 1.4.2 or JDK 1.4.2 on a recent Amazon Linux server. The best option so far seems to install from source. However - where can I download this? I believe 1.4 is still from the Sun era, but I can't find it on the Oracle site, and the sun site is gone. Openjdk has no 1.4 download afaik.

Where can I download Java 1.4.2 source code?

As the goal is to get the installation working, other options are welcome. I tried to install the bin file, but got an error: cannot execute binary file.

2 Answers 2

4

This solution works on a 64 bit machine. Download j2sdk-1_4_2_19-linux-i586.bin from Oracle. Run it:

sudo sh j2sdk-1_4_2_19-linux-i586.bin

You can move this folder to /opt/ or where you want it. After installing, you can check if it works:

/opt/jre-1.4.2/bin/java -version

Then you may get the following error message:

-bash: /opt/jre-1.4.2/bin/java: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

Installing glibc.i686 will fix this:

sudo yum -y install glibc.i686

Another try:

/opt/jre-1.4.2/bin/java -version

Output:

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)

NB: this answer doesn't provide the source code, but gives a solution to installing Java 1.4.2, which was the underlying request.

2

You can't download the complete source code for Java 1.4.2, Sun never published it (as far as I'm aware). On the Oracle page you link to, scroll down to version 1.4.2_19 and you'll find installation packages for 32-bit Intel CPUs, which you may be able to use on your Amazon server (if you can install the necessary 32-bit supporting libraries).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .