I am running Ubuntu 12.04 LTS. I wanted to install Java and so I downloaded the 32-bit self extracting .bin file from http://www.java.com and tried to install it according to their instruction.

First I made the file an executable one. Then created /usr/java/. After that I have to run this command: ./jre-7u<version>-linux-i586.bin.

But I'm stuck here. My Java version is Java 6 u32. When I enter the command it says "no such file or directory". What to do? Please help. Also I'm trying to install 32-bit Java on my 64-bit Precise. Could that possibly be the problem?

I tried to follow second answer by Jonas Christensen. I tried to open it, it says file is an unknown type. I tried the terminal command: ./jre-6u31-linux-i586.bin. But it gave this:

./jre-6u32-linux-i586.bin: 86: ./jre-6u32-linux-i586.bin: ./install.sfx.5736: not found  
Failed to extract the files. Please refer to the Troubleshooting section of the Installation Instructions on the download page for more information.

Please see the "bug" described at: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6500693

Resolve by installing 32 bit libs:

sudo apt-get install ia32-libs

  • 2
    On Ubuntu 13.10 , instead of ia32-libs, I installed lib32z1.
    – kostmo
    Oct 21 '13 at 4:17
  • On Ubuntu 20.04 LTS, I used lib32z1 Sep 14 '20 at 18:28

The easiest method to install Oracle Java 7 via PPA:

  1. sudo add-apt-repository ppa:webupd8team/java
  2. sudo apt-get update
  3. sudo apt-get install oracle-java7-installer

See also:


If you don't actually need a specific version of java for a special purpose, download the now-latest 7u7 version as a tar file: download 7u7 from java.com | download 6u35 from java.com.

Note that 6u35 link is a bin file as yours. But I have just tried to run it and it works. It is a generic shell script so to execute it: sh jre-6u35-linux-x64.bin. It wouldn't break anything that runs on 6u32, so download it with comfort.

Extract the archive and put contents to any directory you want (chosing a directory like /opt/java or /usr/local/java is ok. put it somewhere that you won't accidentally remove) and keep a note of the full path to that directory. Then edit as needed and put the following code into an executable .sh file inside /etc/profile.d:

# You may put this in /etc/profile.d/java.sh

if [ -d <full-path-to-java> ]; then
  export PATH=$PATH:<full-path-to-java>;

# dont forget to make executable, run following in your terminal:
# chmod +x /etc/profile.d/java.sh

As a little note, don't keep the '<' and '>' characters in :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.