CS Department's FAQ Knowledgebase
Frequently Asked Questions concerning the Department of Computer Science
CS Home    Glossary    Contact Us
Search  
   
Browse by Category
CS Department's FAQ Knowledgebase .: Computing Information .: Linux .: Java, jdk, and Eclipse on Fedora machines

Java, jdk, and Eclipse on Fedora machines

Q. I've noticed that the Fedora machines are using the Gnu Java compiler JDK instead of the Sun Java JDK, which causes a lot of problems with code that would otherwise compile. I was wondering if it was possible to install the java-sun-6-jdk and Eclipse(not Fedora Eclipse) on the Fedora machines as this would greatly improve java coding on these machines.

 A. /usr/bin/java  and /usr/bin/javac  on the Fedora machines are the Gnu versions. These are as provided as part of the Redhat Fedora releases.

# /usr/bin/java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20070626 (Red Hat 4.1.2-13)

# /usr/bin/javac -v
Eclipse Java Compiler v_686_R32x, 3.2.2 release, Copyright IBM Corp 2000, 2006. All rights reserved.


/usr/local/bin/java  and /usr/local/bin/javac on the Fedora machines are the Sun 1.5 versions. If /usr/local/bin is in your search path ahead of /usr/bin, you will get this version by default.

# /usr/local/bin/java -version
java version "1.5.0_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_03-b07)
Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode)


The Sun 1.6 version of java is now installed on the 32 bit Fedora machines in /usr/local/jdk1.6.0_02-i386/bin/java and javac.

# /usr/local/jdk1.6.0_02-i386/bin/java -version
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
Java HotSpot(TM) Client VM (build 1.6.0_02-b05, mixed mode)


The Sun 1.6 version of java is now installed on the 64 bit Fedora machines in /usr/local/jdk1.6.0_02-x86_64/bin/java and javac.

# /usr/local/jdk1.6.0_02-x86_64/bin/java -version
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_02-b05, mixed mode)


Fedora Eclipse, version 3.2.2, is installed on the Fedora machines in /usr/bin/eclipse.

Eclipse version 3.3 for the 32 bit machines is now installed in /cs/linux/eclipse-3.3-i386/eclipse.

Eclipse version 3.3 for the 64 bit machines is now installed in /cs/linux/eclipse-3.3-x86_64/eclipse. Note that in order to use this, you need to have /usr/local/jdk1.6.0_02-x86_64/bin in your path, so that this eclipse finds a 64 bit version of java.

To use the Sun 1.6 versions of java and javac, you could put the bin directories above in your search path. To use one of the 3.3 versions of eclipse, you could use the full path to it.


How helpful was this article to you?

Related Articles

article Error opening Eclipse on the graphics machines in GS 930.
 Q. I'm getting an error opening Eclipse on the graphics...

(No rating)  11-1-2007    Views: 775   
article Eclipse won't open
Eclipse won't open and I receive the following error...

  1-31-2006    Views: 3218   
article Problems compiling Java, running MPI jobs, etc. on Lectura
 I haven't been able to compile my java programs since...

(No rating)  12-5-2006    Views: 968   

User Comments

Add Comment
No comments have been posted.


.: Powered by Lore 1.5.6
All contents copyright © 2008. Arizona Board of Regents