Globus Toolkit Tutorial The Globus Consortium
 
 

Chapter 5: Fixing Java and ANT

Removing default Java

The default java installed for Fedora Core 4 MUST be removed. It will not work with the Globus toolkit and it is easier and less troublesome to remove it entirely.

First see if the default java is installed:

[root@nodeB ~]# which java
/usr/bin/java

That file is usually a symlink:

[root@nodeB ~]# ls -alh /usr/bin/java
lrwxrwxrwx 1 root root 22 Oct 7 16:06 /usr/bin/java -> /etc/alternatives/java

That link is actually a link to the actual binary:

[root@nodeB ~]# ls -alh /etc/alternatives/java
lrwxrwxrwx 1 root root 35 Oct 7 16:06 /etc/alternatives/java -> /usr/lib/jvm/jre-1.4.2-gcj/bin/java

You can use 'rpm' to query and see which package actually owns the binary:

[root@nodeA ~]# rpm -qf /usr/lib/jvm/jre-1.4.2-gcj/bin/java
java-1.4.2-gcj-compat-1.4.2.0-40jpp_31rh.FC4.2

With the name of the binary package known, use yum to remove it:

Note that the yum remove command should be the entire file name WITH extension. In some cases this may end with a reference to FC4, but not always.

[root@nodeB ~]# yum remove java-1.4.2-gcj-compat-1.4.2.0-40jpp_31rh

Note that this will remove a fair number of packages, but that is ok (and desired). You might see output that looks like the following:

Package Arch Version Repository Size
Removing:        
java-1.4.2-gcj-compat i386 1.4.2.0-40jpp_31rh installed 1.7 k
         
Removing for dependencies:        
ant i386 1.6.2-3jpp_8fc installed 7.6 M
ant-apache-bcel i386 1.6.2-3jpp_8fc installed 5.6 k
ant-apache-log4j i386 1.6.2-3jpp_8fc installed 8.6 k
ant-apache-oro i386 1.6.2-3jpp_8fc installed 3.0 k
ant-apache-regexp i386 1.6.2-3jpp_8fc installed 65 k
ant-apache-resolver i386 1.6.2-3jpp_8fc installed 3.7k
ant-commons-logging i386 1.6.2-3jpp_8fc installed 4.0 k
ant-javamail i386 1.6.2-3jpp_8fc installed 6.7 k
ant-jdepend i386 1.6.2-3jpp_8fc installed 38 k
ant-jmf i386 1.6.2-3jpp_8fc installed 376
ant-junit i386 1.6.2-3jpp_8fc installed 115 k
ant-nodeps i386 1.6.2-3jpp_8fc installed 395 k
ant-scripts i386 1.6.2-3jpp_8fc installed 12 k
ant-swing i386 1.6.2-3jpp_8fc installed 3.3 k
ant-trax i386 1.6.2-3jpp_8fc installed 122 k
avalon-logkit noarch 1.2-2jpp_4fc installed 81 k
java-1.4.2-gcj-compat-devel i386 1.4.2.0-40jpp_31rh installed 2.2 k
java-1.4.2-gcj-compat-src i386 1.4.2.0-40jpp_31rh installed 0.0
jessie noarch 1.0.0-8 installed 391 k
ldapjdk noarch 4.17-1jpp_2fc installed 439 k
struts11 i386 1.1-1jpp_7fc installed 5.9 k

Transaction Summary
===========================
Install 0 Package(s)
Update 0 Package(s)
Remove 23 Package(s)
Total download size: 0
Is this ok [y/N]: y

...

Removed: java-1.4.2-gcj-compat.i386 0:1.4.2.0-40jpp_31rh
Dependency Removed: ant.i386 0:1.6.2-3jpp_8fc ant-antlr.i386 0:1.6.2-3jpp_8fc ant-apache-bcel.i386 0:1.6.2-3jpp_8fc ant-apache-log4j.i386 0:1.6.2-3jpp_8fc ant-apache-oro.i386 0:1.6.2-3jpp_8fc ant-apache-regexp.i386 0:1.6.2-3jpp_8fc ant-apache-resolver.i386 0:1.6.2-3jpp_8fc ant-commons-logging.i386 0:1.6.2-3jpp_8fc ant-javamail.i386 0:1.6.2-3jpp_8fc ant-jdepend.i386 0:1.6.2-3jpp_8fc ant-jmf.i386 0:1.6.2-3jpp_8fc ant-junit.i386 0:1.6.2-3jpp_8fc ant-nodeps.i386 0:1.6.2-3jpp_8fc ant-scripts.i386 0:1.6.2-3jpp_8fc ant-swing.i386 0:1.6.2-3jpp_8fc ant-trax.i386 0:1.6.2-3jpp_8fc avalon-logkit.noarch 0:1.2-2jpp_4fc java-1.4.2-gcj-compat-devel.i386 0:1.4.2.0-40jpp_31rh java-1.4.2-gcj-compat-src.i386 0:1.4.2.0-40jpp_31rh jessie.noarch 0:1.0.0-8 ldapjdk.noarch 0:4.17-1jpp_2fc struts11.i386 0:1.1-1jpp_7fc
Complete!

Now check to make sure that the default java is gone:

[root@nodeB ~]# which java

Note: The following code appears on multiple lines, but it is 'one' line of code

/usr/bin/which: no java in(/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/
local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin)

[root@nodeB ~]# ls -l /usr/bin/java
ls: /usr/bin/java: No such file or directory

 
 
 
FAQ Feedback The Globus Consortium Home Page