Install Java 1.4 for 32bit on 64bit Linux


The author of this article is a general company developing its own products for Java / .NET. When it comes to Enterprise, support for Java 1.4 is still required, so we are building a development environment with Java 1.4. If you do not do this, you will not be able to develop your own products.

So, some installers for Java 1.4 of Windows have been inherited from generation to generation & even in the 32bit version, It works (looks like) on Windows, but not on the Linux version. I looked around various articles, but there was no environment where all the information was compiled, so I wrote it in the hope that it would help someone in need. (Is there such a person ...?)


Execution environment

I don't like the environment getting dirty by trial and error, so I use Docker.


Things to prepare

Get the binaries from Oracle's Java Archive Download Site (

Installation procedure

$ mkdir /usr/local/java/
$ unzip j2sdk-1_4_2_19-linux-i586.bin -d /usr/local/java/
$ export JAVA_HOME=/usr/local/java/j2sdk1.4.2_19
#Also specify the PATH
$ export PATH=${PATH}:${JAVA_HOME}/bin

Well, let's do it!

$ java -version
$ bash: /usr/local/java/j2sdk1.4.2_19/bin/java: /lib/ bad ELF interpreter: No such file or directory

That ...?

Cause of error (/lib/ bad ELF interpreter: No such file or directory)

It seems to be a glibc compatible library needed to run binaries built for 32bit. Without it, it won't work on 64-bit Linux.

Install glibc

$ yum install -y

Well, let's do it! (2nd time)

$ java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object

~~ Yes Kuso ~~

Cause of error (java / lang / NoClassDefFoundError: java / lang / Object)

It seems that the cause is that $ {JAVA_HOME $} /lib/rt.jar is missing, or java / lang / Object.class is missing in it. The rt.jar is not included in the downloaded binary. .. ..

$ cd ${JAVA_HOME}/lib
$ ls -al | grep rt.jar -c

I read a lot of information and searched, but I couldn't find a good way.


$ mkdir /usr/local/java/
# /Put the binary in tmp
$ chmod +x /tmp/j2sdk-1_4_2_19-linux-i586.bin
$ cd /usr/local/java/
#Run binary
$ /tmp/j2sdk-1_4_2_19-linux-i586.bin
License lasts for a long time
  Do you agree to the above license terms? [yes or no]
  #When this text appears, enter yes only if you agree to the license terms and press enter to start the installation.
$ export JAVA_HOME=/usr/local/java/j2sdk1.4.2_19
#Also specify the PATH
$ export PATH=${PATH}:${JAVA_HOME}/bin

You can now run it safely.

$ 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)

Just in case, let's try build-execution.

public class Hello {
        public static void main(String[] args) {
                System.out.println("Hello, World");

Hello, World seen from the face of the parents ...

$ javac
$ java Hello
Hello, World

I think I managed to do something


Java these days seems to be usable as long as you install the binaries and pass the PATH, so if you try to do it in a good way, it seems to have failed. .. .. Binary installation is easy and nice!

~~ If you bring the executable file (JAVA_HOME) to another environment after installing it, it will work as long as you have ~~

Recommended Posts

Install Java 1.4 for 32bit on 64bit Linux
Install oracle java8 on amazon linux2
Install cvxopt on 64bit Anaconda
Install Linux on your Chromebox
Install the JDK on Linux
Install tomcat 5.5 on Amazon Linux.
Procedure for manually installing Java (jdk1.8) on Linux (CentOS7)
How to install Linux on a 32bit UEFI PC
Compile and install MySQL-python for python2.7 on amazon linux
Install Python Pillow on Amazon Linux
Install python2.7 on windows 32bit environment
Install Arch Linux on DeskMini A300
How to install VMware-Tools on Linux
Install java (Oracle JDK14) on CentOS7
Install confluent-kafka for Python on Ubuntu
pykintone on Windows Subsystem for Linux
I'll install Ruby on EC2 (Amazon Linux2) 2020
Install scipy on Linux without internet connection
Install wsl2 and master linux on windows
Install and Configure TigerVNC server on Linux
Install 64-bit OS (bate) on Raspberry Pi
How to install packages on Alpine Linux
5 reasons to install Linux on your laptop.
Install docker-compose on 64-bit Raspberry Pi OS
Dockerfile: Install Docker on your Linux server
How to install Windows Subsystem For Linux
Install ubuntu on 32bit UEFI Ultra Notebook
How to install php7.4 on Linux (Ubuntu)
Install rJava on Linux in R3.6 environment.
Until you install Arch Linux on VMware
Until you install Apache and Tomcat on Linux (CentOS) and deploy Java apps
pyenv for linux
Install debian on linux on Arrows tab Q584 / H
[Note] Install wxPython 3.x on Linux Mint (Ubuntu)
(For myself) AWS_Flask_3 (Install / Run Flask on AWS)
Install mecab on Marvericks
Install Tensorflow on Mac
Daemonizing processes on Linux
Install TensorFlow on Ubuntu
Install python on WSL
Install pyenv on mac
Install pip on Mavericks
Linux permissions in Java
Install Python on Pidora.
Install mongodb on termux
Install Scrapy on python3
Install Grub on USB memory (UEFI) ~ Boot Linux from grub on USB memory ~
jblas on Arch Linux
Install docker on Fedora31
Linux (WSL) on Windows
NAT router on Linux
[For memo] Linux Part 2
Install numba on CentOS 7.2
Create a QR code for the URL on Linux
[Node] [npm] Install npm packeage on MacOS / Linux without sudo
Build a Python extension for E-Cell 4 on Windows 7 (64bit)
Install Ansible on Mac
Install Python on Mac
Install Python 3 on Mac
Install Plone (4.3.6) on MacOSX (10.10.3)
Install PySide2 on Ubuntu