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.6keith@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