Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Java Setup on Scientific Linux showing two diffent versions.

I am trying to get java setup right on Scientific Linux.

If I do a javac -version I get the following: java_1.7.0_10 which is the version that I really want to be using.

But if I do a java -version I get the following:

OpenJDK Runtime Environment (IcedTea6 1.11.5) (rhel-1.50.1.11.5.el6_3-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)**

Which is not the version I would like to run with... Can someone please tell me how to fix this issue.. thanks

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

Well, as ewwhite said, this looks fine.

but if you want to use the Sun JAva, you can download the same from their site.

After downloading, you can use this command to switch the java from default to the Sun java.

# sudo /usr/sbin/update-alternatives --config java

After running this command, you will get an option to add new java and use that instead of this one.

share|improve this answer
add comment

This is fine. It means you're running the OpenJDK 7 distribution provided with your operating system.

If you have a requirement for Sun/Oracle Java, you can download that as well, but what you have is fine.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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