sudo apt-get install default-jre:i386

Explanation:

In Debian (and Ubuntu, which is based on it), you can install the same package for multiple architectures side by side - this is called "multiarch". When installing a package, the part after the colon indicates the architecture (in this case i386, i.e. 32bit). Without the colon part, you get the default architecture. See the MultiarchHOWTO for details.

Answer from sleske on Stack Overflow
🌐
Oracle
java.com › en › download › help › linux_install.html
How do I download and install 32-bit Java for Linux?
Instructions to download and install the Java Runtime Environment (JRE) for 32-bit Linux
🌐
Reddit
reddit.com › r/ubuntu › q on java 32bit on ubuntu 22.04
r/Ubuntu on Reddit: Q on Java 32bit on Ubuntu 22.04
July 14, 2022 -

I’m trying to run RomRaider for ECU tuning on my Linux env on a 2012 MBP.

I’m having trouble finding/invoking a 32bit version as it’s a 64bit env, and default installer in Terminal installs 64bit.

I tried downloading jre-8u341-linux-i586.tar.gz and executing extraction from terminal. No luck, likely user error.

I’m a total Ubuntu rook and just built this setup yesterday for this use case. Any insight at all is greatly appreciated.

Thank you!

🌐
Codeinterpreter
codeinterpreter.com › 2020 › 01 › install-jdk-on-ubuntu-32-bit-and-64-bit.html
Install JDK on Ubuntu 32 bit and 64 bit ~ CodeInterpreter
These instructions will also work on Debian and Linux Mint 1. Go to terminal and type /sbin/init, this command to check your Ubuntu architecture weather it's 32 or 64 bit. 2. Check Java installed, type java-version on your terminal.
🌐
Oracle
oracle.com › java › technologies › javase-install-linux-rpm-32.html
JDK RPM 32-bit Installation | Oracle
This procedure installs the Java SE Runtime Environment for 32-bit Linux, using an RPM binary bundle. Some Linux distributions, such as Ubuntu, are not RPM-based. In that event, please see the self extracting installation page. The name of the downloaded file has the following format:
🌐
DZone
dzone.com › coding › java › 32 bit jdk on a 64 bit ubuntu system
32 bit JDK on a 64 bit Ubuntu System
September 9, 2008 - To install the 32 bit JDK from Sun on a 64 bit system you can use java-package. I’ve been running Eclipse and all my development applications and finally have some free memory again. First, download the latest 32 bit JDK (not JRE) from Sun.
Find elsewhere
🌐
Ubuntu
ubuntu.com › tutorials › install-jre
Install the Java Runtime Environment | Ubuntu
openjdk version "11.0.11" 2021-04-20 OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2) OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2, mixed mode) (Although the output may change in the future as new Java versions are promoted to LTS status, or the current LTS version receives updates.) And that’s it! In the next step we’ll install Oracle HotSpot JRE. Download JRE binaries in .tar.gz (tarball) by heading over to their website.
Top answer
1 of 3
4

It's super easy to have multiple versions of Java installed. Somewhat harder (read: tedious) is switching between versions at a whim.

tldr

  1. apt-get one
  2. untar the other
  3. export paths depending which one you want

apt-get one version

Decide which version you'll mostly be using. Or decide which one you want to have automatic updates. Or flip a coin, whatever. You don't even have to use apt-get; just manually maintain both packages on your system (see next heading).

The point is: it's easier to use Ubuntu's package manager to maintain exactly one version of a package like java. You're gonna take care of the rest.

untar the other

Download a jdk tarball. Extract it to /opt.

switch between them

I let the package manager handle my primary install. I export some vars for the other one when I need it. I work on the command line a lot, so it's an okay solution for me. I bother with:

export JAVA_HOME=/opt/jdk
export PATH=$JAVA_HOME/bin:$PATH

Also, I symlink jdk/ -> jdk1.6.0_3/ because I'm lazy and don't like reconfiguring my .bashrc and other scripts every incremental jdk upgrade.

Environment variables you might care about:

JAVA_LIBDIR
JNI_LIBDIR
JAVAJNI_LIBDIR
JVM_ROOT
JAVA_HOME
PATH
2 of 3
2

Installation

First, download the latest 32 bit JDK (not JRE) from Sun. At the time this was jdk-6u7-linux-i586.bin for me.

Install java-package:

sudo apt-get install java-package 

Now use java-package to build a .deb package from the binary you downloaded. You have to trick it into building the 32 bit package:

DEB_BUILD_GNU_TYPE=i486-linux-gnu DEB_BUILD_ARCH=i386 fakeroot make-jpkg jdk-6u7-linux-i586.bin 

This should generate a .deb package. For some reason the package name has the _amd64 suffix. Install the package:

sudo dpkg -i sun-j2sdk1.6_1.6.0+update7_amd64.deb 

Use update-alternatives to select the new JDK. It was installed at /usr/lib/j2sdk1.6-sun for me.

sudo update-alternatives --config java 

If you run java -version you should see the correct version:

java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)

32 bit Eclipse

I had to reinstall the 32 bit version of Eclipse (since SWT contains native code). I also had to delete my ~/.eclipse directory or Eclipse wouldn’t start (this requires reinstalling new versions of any plugins). Finally, add the new JRE in Java->Installed JREs using the install location (/usr/lib/j2sdk1.6-sun) and select it as the default.

ref

🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › software & applications
How to install 32 bit Java on 64 bit system? - Linux Mint Forums
Clean workaround: install VirtualBox, install a Virtual Machine (VM) with a 32-bit edition of Mint in VirtualBox, install 32-bit Java in that VM, and then install MusicMagicMixer in the VM.
🌐
Reddit
reddit.com › r/ubuntu › jre 32bit install
r/Ubuntu on Reddit: Jre 32bit install
January 4, 2025 -

Just a disclaimer, i am fairly new to linux and I have been trying to install Java runtime for days through wine, I have gotten continuous errors, I am using Java 8u431 32 bit, I keep getting the error msi:custom_get_thread_return invalid return code 610018 Msi:ITERATE_Actions execution halted, action L "validateinstalldir" returned 1603 I have been trying to use game extractor on linux, it requires Java 32bit, I have tried to install regular Java 32 bit on linux and that didn't work so I'm attempting to do it through wine as a windows program, i am using the java executable, and that isn't working either, If anyone has any ideas on how to get this running would be appreciated

Top answer
1 of 2
2

I'll try to answer all your questions, but please break them into separate Q&As in the future. It makes it easier for one person to answer.

  1. You seem to have a bit of a misunderstanding in regards to 32-bit. x86 is actually 32-bit. x86 is named after a line of old Intel CPUs (I think), but they didn't really have anything to name 64-bit after, so it became x64.

    • Get the x86 version
  2. You'll have to adapt the file names a bit, since Java versions have changed, but this Ask Ubuntu Q&A has very extensive installation instructions: How can I install Sun/Oracle's proprietary Java JDK 6/7/8 or JRE?.

  3. As for default Java version, you need to have the one you want as default installed, and then you need to select it as the default. How to set default Java version?.

    • The command you want, since it looks like you're dealing with javac, is:

      sudo update-alternatives --config javac
      
    • Replacing javac with java will allow you to change defaults there too.

Honestly, I'm having a hard time understanding your question fully, and I see you don't speak English natively. Hopefully, what I have below will make the whole thing easier.

There's an alternative to Oracle's JDK, called OpenJDK. It's a very simple installation, and I believe it sets itself as the default Java version. To install:

sudo apt-get install openjdk-8-jdk
2 of 2
0

There is Webupd8 PPA for Java, you can install it by entering this one by one in terminal

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

For more info, see http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html

🌐
BlueJ
bluej.org
BlueJ
Requires 64-bit Intel processor running Debian 11 or Ubuntu 20.04 or later. Also available: A version for ARM64 processors (e.g. Raspberry Pi). Please read the Installation instructions. (Works on most platforms with Java/JavaFX 21 support). Note: BlueJ requires a 64-bit operating system, which 95+% of users will have. For 32-bit operating systems, download BlueJ 4.1.4 instead.
🌐
Filepuma
filepuma.com › download › java_runtime_environment_32bit_-295 › versions
All Versions of Java Runtime Environment (32bit) - Filepuma.com
Java Runtime Environment (32bit) Old Versions · Old Versions · 1 2 3 4 5 >> 1 2 3 4 5 >> Glary Utilites · Make Your Computer Faster · Totally Free · No Bundle,No Ads, No Virus Download Now · Trending · Java Runtime Environment (32bit) 8 Update 471 · Java Runtime Environment (64bit) 8 Update 471 ·
🌐
ExtraVM
thishosting.rocks › install-java-ubuntu
How to (Easily) Install Java on Ubuntu – ThisHosting.Rocks
January 17, 2022 - Go to Oracle’s downloads page and select the version you want to download. We’ll use Java’s Standard Edition 17 for the purpose of this tutorial. Replace the version numbers if you’re going to use a different version. Java 17 is only available for 64-bit systems, so if your Ubuntu is 32-b...