2

I have recently upgraded to Ubuntu 11.10 and was noticing that Java was not working on a few websites and ran a check:

keith@KD-PB:~$ java -version

java version "1.5.0"

gij (GNU libgcj) version 4.6.1

Copyright (C) 2007 Free Software Foundation, Inc.

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

So I uninstalled my Java (OpenJDK 1.6.0 according to Ubuntu Software Centre) and reinstalled it and all the dependicies. So tried checking I had the right Java package installed;

keith@KD-PB:~$ sudo update-alternatives --config java

There is only one alternative in link group java: /usr/bin/gij-4.6

Nothing to configure.

So now I am scratching my head and not sure what is wrong. I have installed Oracle's JRE 6 and it works straight away, so what could be wrong with the OpenJDK?

Thanks

UPDATE - From some suggestions I inputted the following and think there is a problem with where /etc/alternatives/java is pointing;

keith@KD-PB:~$ ls -l which java lrwxrwxrwx 1 root root 22 2011-10-17 06:34 /usr/bin/java -> /etc/alternatives/java keith@KD-PB:~$ ls -l /etc/alternatives/java lrwxrwxrwx 1 root root 16 2011-10-17 06:34 /etc/alternatives/java -> /usr/bin/gij-4.6

keith@KD-PB:~$ dpkg -S /usr/lib/jvm/java-6-openjdk/jre/bin/java openjdk-6-jre-headless: /usr/lib/jvm/java-6-openjdk/jre/bin/java

2
  • How did you install the Oracle JRE?. Oct 17, 2011 at 8:48
  • I installed Oracle's Java via this PPA launchpad.net/~ferramroberto/+archive/java I try to avoid adding PPA's that I am not 100% about. I am still trying to get OpenJDK to work, but keep getting the same message.
    – KD353
    Oct 23, 2011 at 19:17

2 Answers 2

1

Yeah... It's weird that the OpenJDK is not working... I had several problems with it and Eclipse, so I had to put Java from Oracle. It works excellent. My suggest: don't install OpenJDK.

0

I tried uninstalling and reinstalling the java installations several times but nothing changed, it would only detect the gij java application, or none at all when that was removed. So the following workaround did it for me.

I added the the Webupd8 PPA to my list of repo's and from their I installedhe application called 'update-java'. After installing I ran it update-java from the terminal, it went looking for the java I had installed, found it and then in a GUI asked me to pick which one to set as standard. After doing this I ran java-version from the terminal to confirm.

I can confirm it is working again and seems to be set up correctly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .