Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed Sun Java Jre 6 from the source. According to the icon under the Applications menu, it is called "Sun Java 6". Yet, the java -version command yields:

java version "1.5.0" gij (GNU libgcj) version 4.5.4

First off, why is Java not 1.6? Also, what is gij?

share|improve this question
    
Perhaps provide some details on how you installed Java? For reference, gij is the interpreter associated with the gcj compiler. –  James Henstridge Mar 17 '12 at 0:55
    
What exactly is gcj? I installed it by downloading a .tar.gz of Java 6 and installed it from there. –  Ryan McClure Mar 17 '12 at 1:49
1  
GCJ is a Java compiler that is part of the GCC tool chain. –  James Henstridge Mar 17 '12 at 2:13
add comment

2 Answers 2

up vote 1 down vote accepted

I figured it out. I ran

 sudo update-alternatives --config java 

and found that my java was not selected. I selected it and now java -version returns 1.6.

share|improve this answer
add comment

Just follow these simple steps:

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin 

Ubuntu doesn't ship Sun Java because it's not totally free.

There's more information here. I suggest you read it.

share|improve this answer
1  
This isn't particularly good advice given lists.ubuntu.com/archives/ubuntu-security-announce/… –  James Henstridge Mar 17 '12 at 2:14
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.