Results 1 to 7 of 7
I installed the latest rpm from sun
Code:
lrwxrwxrwx. 1 root root 16 Mar 13 11:58 default -> /usr/java/latest
drwxr-xr-x. 9 root root 4096 Mar 13 11:58 jdk1.6.0_24
drwxr-xr-x 9 ...
- 05-15-2011 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 4
Keeps referencing wrong version of java
I installed the latest rpm from sun
I have my .bashrc JAVA_HOME pointing to /usr/java/latestCode:lrwxrwxrwx. 1 root root 16 Mar 13 11:58 default -> /usr/java/latest drwxr-xr-x. 9 root root 4096 Mar 13 11:58 jdk1.6.0_24 drwxr-xr-x 9 root root 4096 May 15 08:44 jdk1.6.0_25 lrwxrwxrwx 1 root root 21 May 15 08:44 latest -> /usr/java/jdk1.6.0_25
But when I do a java -version I get:
The other odd thing is that in package manager, openjdk 5 does not exist, and openjdk 6 is not installed. So I am baffled as to how it is using this version of java. Any ideas??Code:java version "1.5.0" gij (GNU libgcj) version 4.5.1 20100924 (Red Hat 4.5.1-4)
- 05-15-2011 #2Just Joined!
- Join Date
- Nov 2010
- Posts
- 4
looks like 1.5.0 was installed by default and is being managed by alternatives. So even though I had simlinks pointing to my jdk it was still using alternatives to manage the active java version. I installed my jdk to alternatives and made it active and it worked. Wish they would just automate this.
- 05-15-2011 #3Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
So, when you execute the command "ls -l /usr/bin/java" where is the link pointing to? My guess is that as buzzterrier says, it will be pointing to /etc/alternatives/java instead of /usr/java/default/bin/java.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 05-16-2011 #4Just Joined!
- Join Date
- Nov 2010
- Posts
- 4
correct, it is pointing /etc/alternatives/java
Slowly getting the hang of this linux thing!
- 05-16-2011 #5Just Joined!
- Join Date
- Feb 2011
- Posts
- 83
RE: Java
Hi,
You may try to uninstall the java machine, clean up all java things from the computer (the components of the integrated software environment I mean) and reinstall it back again.
I personally would prefer to work with the java package that is listed in the repository list of the linux distro (1.6 as far as I can see), rather than downloading from the net packages with unknown risk.
Actually the error may be insignificant and if you try to connect to the java guys from sun they may be able to fix it 'as it is at the moment'.
The good news is that you have options and the bad news is that you have to decide to choose one (at your own discretion).
Regards
- 05-18-2011 #6Just Joined!
- Join Date
- May 2011
- Posts
- 3
- 05-18-2011 #7Just Joined!
- Join Date
- Feb 2011
- Posts
- 83
Hi,
Check up what you have on your computer.
$ rpm -qa|grep java
$ rpm -qa|grep jdk
These commands list the compiled packages of java and jdk respectively.
Then check up which of the packages are installed and connected to the system:
$ rpm -q java
$ rpm -q jdk
If it lists one and the same package as 1.5 and 1.6, erase the 1.5 version:
$ rpm -e java-1.5
If it lists 1.6 but it is not installed, erase 1.5 (if any) and install the 1.6.
If this gives a message 'Package java-*/jdk-* is not installed' - install the 1.6 if available, and if not - the 1.5 one.
Maybe the system is not able to install the 1.6 for you have compatibility layers to CJI on 1.5.
You may also try to Navigate to Add/Remove Software from the Desktop menu and in the search box to write: java
... and after that: jdk
to see which of the packages are installed and which are not, which is 1.5 and which 1.6.
In my repo some of the java packages are 1.5 and some are 1.6.
If you come to a 'Dead End Street' ask the guys from Sun or the developers of your linux distro how to proceed.
Regards


Reply With Quote
