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 OverflowVideos
Download of Java 32-Bit-Version for Linux: https://www.java.com/en/download/linux_manual.jsp
After java 8 there is no more 32 bit Oracle virtual machine. I think the same is for OpenJDK. You can search if you want for another virtual machine which has 32 bit and after that install it.
For example I see that Azul has 32 bit machine. But honestly I never test them. Maybe there are other JVM providers with 32 bit machines: https://www.azul.com/downloads/zulu/zulu-linux/
By the way I also don't know what kind of licences they have.
Apart from that Ubuntu 18.10 by default try to install OpenJDK 11. If you are OK with java 8 you can search how to install java 8 32 bits.
Good luck!
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!
It's super easy to have multiple versions of Java installed. Somewhat harder (read: tedious) is switching between versions at a whim.
tldr
- apt-get one
- untar the other
- 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
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
https://askubuntu.com/questions/819996/howto-install-latest-oracle-java-jdk-32-bit-to-linux-xubuntu-14-04-64-bit-ea
All command line.
"The easiest solution I have found so far is using a great tool called Oraji
which automatically does the configuration for you. Here is the brief
excerpt from the install instruction created by the Oraji developer:
Download latest official 32-Bit Oracle JDK. File name should be jdk-... -
linux-i586.tar.gz from
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-
2133151.html
Install Oraji on Ubuntu:
sudo add-apt-repository -y ppa:neurobin/ppa
sudo apt-get update
sudo apt-get install oraji
Java Installation Instruction:
Run in terminal:
sudo oraji '/path/to/the/jdk_or_jre_archive'
or run
sudo /path/to/oraji /path/to/the/jdk_or_jre_archive
after giving the oraji script execution permission if you didn't install the
script.
That's it. Now if you want to populate JAVA_HOME and other environment
variables run source /etc/profile or logout and login.
For more info like Uninstall, Changing JDK version, just follow this nice
tutorial by Oraji developers https://github.com/neurobin/oraji
Have a great day, guys!"--Chiggiddi (Ubuntu Ask)
Download the Linux x86 file that ends in ".tar.gz" from Oracle JDK download site
Then, uncompress with:
tar -zxvf file.tar.gz
and there you have it. In order to use it you will need to include the "bin" subfolder in your PATH environment variable.
To be able to use the 32-bit JVM, you'll need to have the 32-bit compatibility libraries installed. The second error message means that the 32-bit JVM process is trying to load a 64-bit library; that doesn't work.
On Ubuntu you'd have to install the package ia32-libs, which contains the 32-bit compatibility libraries for 64-bit Ubuntu.
UPDATE: Ubuntu 13.10 introduced multi-arch which replaced ia32-libs with libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386. Source: https://stackoverflow.com/a/10473415/14731
I just had the same issue on Ubuntu 14.04, where I wanted to keep my 32-bit Oracle Java on a 64-bit install. ia32-libs is gone since Ubuntu 13.10, and now the glib answer is "just download the i386 libraries that you need". Unfortunately, there doesn't seem to be an easy way to find out which libraries those are.
The simple remedy is to install 32-bit OpenJDK as
sudo apt-get install openjdk-7-jdk:i386
That pulls in a large number of i386 libraries. You can uninstall the OpenJDK again if you like, but I left it in place so I don't accidentally autoremove the libraries.
Put Oracle JDK on the PATH, and now Eclipse and NetBeans will start up fine.
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
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.
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
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?.
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 javacReplacing
javacwithjavawill 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
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