December 16, 2011
OpenJDK is by far the path of least resistance on a Fedora System.
It is important to note that OpenJDK is not some offbeat alternative Java project (at least not at this point in time), but it is the Java source released by Sun, with the requisite additions to make it fully open source.
Also it is important to point out that JDK 6 is also called 1.6.0. Similarly JDK 7 is called 1.7.0. I don't have a clue why these two parallel numbering schemes are in use, but I don't think it is a great idea. Note that JDK 6 tracks Java 6 from Sun, and JDK 7 tracks Java 7 from Sun (actually now Oracle).
Typing java -version gives me:
java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.4) (fedora-61.1.10.4.fc16-x86_64) OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
Typing the command "javac -version" tells me that I do not have javac.
I type the command yum list | grep java and get the following:
java-1.5.0-gcj.x86_64 1.5.0.0-37.fc16 fedora java-1.5.0-gcj-devel.x86_64 1.5.0.0-37.fc16 fedora java-1.5.0-gcj-javadoc.x86_64 1.5.0.0-37.fc16 fedora java-1.5.0-gcj-src.x86_64 1.5.0.0-37.fc16 fedora java-1.6.0-openjdk-demo.x86_64 1:1.6.0.0-61.1.10.4.fc16 updates java-1.6.0-openjdk-devel.x86_64 1:1.6.0.0-61.1.10.4.fc16 updates java-1.6.0-openjdk-javadoc.x86_64 1:1.6.0.0-61.1.10.4.fc16 updates java-1.6.0-openjdk-src.x86_64 1:1.6.0.0-61.1.10.4.fc16 updates java-1.7.0-openjdk.i686 1:1.7.0.1-2.0.3.fc16 updates java-1.7.0-openjdk.x86_64 1:1.7.0.1-2.0.3.fc16 updates java-1.7.0-openjdk-demo.x86_64 1:1.7.0.1-2.0.3.fc16 updates java-1.7.0-openjdk-devel.i686 1:1.7.0.1-2.0.3.fc16 updates java-1.7.0-openjdk-devel.x86_64 1:1.7.0.1-2.0.3.fc16 updates java-1.7.0-openjdk-javadoc.noarch 1:1.7.0.1-2.0.3.fc16 updates java-1.7.0-openjdk-src.x86_64 1:1.7.0.1-2.0.3.fc16 updatesI intend to ignore the gcj packages (gnu compiler for java). A guiding light in this is the following statement from the Fedora Java FAQ:
Eventually at some point OpenJDK will replace GNU Java completely.I note that I can (and must) choose explicitly between the 1.6.0 and 1.7.0 versions of openjdk.
Why would I want to have anything to do with 1.7.0 and why does Fedora provide 1.6.0 instead of 1.7.0 by default on a new install? At this point I have no idea.
I do this:
yum install java-1.6.0-openjdk-develAfter this I can do:
[root@cholla tom]# javac -version javac 1.6.0_22I also do:
yum install java-1.6.0-openjdk-demo yum install java-1.6.0-openjdk-javadocThis gives me a fully working install of OpenJDK 1.6.0 to try out.
Adventures in Computing / tom@mmto.org