Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 3116  / 2 Years ago, sun, august 21, 2022, 5:25:12

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



More From » 11.10

 Answers
2

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.


[#42886] Sunday, August 21, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
istmasted

Total Points: 287
Total Questions: 130
Total Answers: 153

Location: Burkina Faso
Member since Thu, Dec 23, 2021
2 Years ago
istmasted questions
;