1

I have Ubuntu 16.04 (32bit) I have openjdk version "1.8.0_121"

I am getting an error from a makefile saying:

You are attempting to build with the incorrect version
of java.

Your version is: openjdk version "1.8.0_121".
The correct version is: Java SE 1.6.

I have tried

sudo apt-get install openjdk-6-jdk

returned

openjdk-6-jdk has no installation candidate

Tried going to http://www.oracle.com/technetwork/java/javase/archive-139210.html

Wont install because of multiple errors

Unpacking...
Checksumming...
Extracting...
./jdk-6u45-linux-i586-rpm.bin: 144: ./jdk-6u45-linux-i586-rpm.bin: ./install.sfx.17173: not found
Installing JavaDB
rpm: RPM should not be used directly install RPM packages, use Alien instead!
rpm: However assuming you know what you are doing...
error: open of sun-javadb-common-10.6.2-1.1.i386.rpm failed: No such file or directory
error: open of sun-javadb-core-10.6.2-1.1.i386.rpm failed: No such file or directory
error: open of sun-javadb-client-10.6.2-1.1.i386.rpm failed: No such file or directory
error: open of sun-javadb-demo-10.6.2-1.1.i386.rpm failed: No such file or directory
error: open of sun-javadb-docs-10.6.2-1.1.i386.rpm failed: No such file or directory
error: open of sun-javadb-javadoc-10.6.2-1.1.i386.rpm failed: No such file or directory

Done.

Also tried the non rpm version from http://www.oracle.com/technetwork/java/javase/archive-139210.html and got:

Unpacking...
Checksumming...
Extracting...
./jdk-6u45-linux-i586.bin: 74: ./jdk-6u45-linux-i586.bin: ./install.sfx.17296: not found
Failed to extract the files.  Please refer to the Troubleshooting section of
the Installation Instructions on the download page for more information.

Somewhere I found openjdk-6_6b38-1.13.10.orig.tar.gz forget where I got that, but it was complaining I didn't have a JDK home directory.

configure: error: "A JDK home directory could not be found."

Im just digging deeper and nothing is working. Wondering if theres some simple repo that I can get openjdk-6-jdk that will actually work?

Thanks!

  • When you downloaded from Oracle it looks like you downloaded the rpm version. You should try to download the other version "jdk-6u45-linux-i586.bin" to use on Ubuntu. – gsxruk Jan 30 '17 at 18:54
  • Tried that too, edited post to show results. No luck with that either. – pottedmeat7 Jan 30 '17 at 19:22
  • Are you installing this on an x64 system? If so, try the answer in this post. You will possibly need to install the 32 bit libraries with sudo apt-get install lib32z1. – gsxruk Jan 30 '17 at 19:35
  • Edited. Im on 32bit – pottedmeat7 Jan 30 '17 at 19:38
  • Ok was able to run ./jdk-6u45-linux-i586.bin after installing lib32z1 was able to follow this post askubuntu.com/questions/67909/how-do-i-install-oracle-jdk-6 moved the extracted into /usr/lib/jvm but the script webupd8.googlecode.com/files/update-java-0.5b was a 404 still don't have an active java installation... java -version doesn't work the script in the post – pottedmeat7 Jan 30 '17 at 19:43
3

Ok so finally got it to work

I went to http://www.oracle.com/technetwork/java/javase/archive-139210.html and downloaded jdk-6u45-linux-i586.bin

I installed the 32 bit libraries

sudo apt-get install lib32z1

then

chmod +x jdk-6u45-linux-i586.bin
./jdk-6u45-linux-i586.bin

then followed this post How do I install Oracle JDK 6?

and had to add the webupd8 repo and do

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo update-java
java -version
1

OpenJDK 6 is still in Ubuntu Trusty :

http://packages.ubuntu.com/search?keywords=openjdk

If you have a reasonably powerful computer you could consider using Qemu/KVM or VirtualBox and install Ubuntu Trusty (14.04) as a guest VM. That would be the most clean solution in my opinion.

There's also a ppa for OpenJDK 6 which might or might not work in your Xenial install by editing the downloaded sources list file (Changing xenial into trusty) :

https://launchpad.net/ubuntu/+source/openjdk-6

In the latter case I recommend to remove the OpenJDK-8 first.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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