Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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-
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
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

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

Your Answer


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.