BIRCH - Java (update October 1, 2006)

gij is NOT Java

On Fedora 4 and later, and probably on some other Linux systems, Java is not included as part of the standard distribution. Many of these distributions will have gij, an open source Java bytecode interpreter. gij is still a work in progress. Out of perhaps  a dozen or so Java applications I have tested in BIRCH,  some failed to launch, and others launched, but ran with serious errors. NONE ran correctly. (Oddly, one frequently gets "NoClassDefFoundError" messages, even though the required class is present. )

Even worse, the Fedora developers have made gij the default java command, such that if you type 'java' what you're running is gij! This is irresponsible, to say the least. In one step Fedora has broken hundreds of reliable Java applications, creating thousands of person hours of work worldwide to get around this problem. Thanks for nothing , guys!

Test java by typing 'java -version' at the command line. If Java is installed and present in the  system $PATH, you should get a message like
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Server VM (build 1.5.0_07-b03, mixed mode)

If you get this message, no further steps are necessary.

On the other hand, if you get a 'Command not found' message, gij is probably not on your system. If you get a message like
java version "1.4.2"
gij (GNU libgcj) version 4.1.1 20060525 (Red Hat 4.1.1-1)

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

then gij is on your system.

Determine whether Java is installed on your system

Whether or not gij is installed on your system, or even if you got a 'Command not found' message when typing 'java' , Java may still be installed on your system, but may not be in the $PATH. Either the JDK or JRE will have a java command. Although Java could be installed almost anywhere, here are some directories to search:


Note: Make sure that the Java directory actually contains a legitimate Java implementation, and not a symbolic link to gcj.

If Java is not present, download and install it

A detailed and understandable guide to installing Java on a Fedora system
can be found at:

If you don't have root permissions, your system administrator will have to do this step.

Make sure java is in the $PATH

The 'java' command that runs the Java Runtime Environment must be in the users' $PATH. A good way to do this is to create a symbolic link from /usr/local/bin to the java executable file. (/usr/local/bin should be part of the system $PATH). For example, eg. cd to  /usr/local/bin and  type

ln -s /usr/java/jdk1.5.0_06/bin/java java

The exact path for Java will vary from system to system.
If you do not have root permissions, and your system administrator is unwilling to put Java into the system $PATH, BIRCH makes it possible to do a workaround.

1. Prior to running during installation, set the BIRCHJAVACMD environment variable. (Substitute into the commands below the actual location of java on your system.) If you are using a C-type shell (eg. csh, tcsh) type

setenv BIRCHJAVACMD /usr/java/jdk1.5.0_06/bin/java

If you are using a BOURNE-family shell (eg. sh, bash, ksh) type


Now you can run

2. After a succesful BIRCH installation, the BIRCHJAVACMD environment variable needs to be set in $BIRCH/local/admin/local.cshrc.source and $BIRCH/local/admin/local.profile.source, so that will run in future BIRCH updates.  Simply uncomment the appropriate lines for BIRCHJAVACMD in each of these files, after the BIRCH installation is complete.

3. $BIRCH/local contains 'bin' directories for binaries for each platform. These directories are automatically added to the $PATH. Therefore, all we need to do is to add a symbolic link from the appropriate $BIRCH/local/bin-xxx-xxx directory to the java command. For example, on a Linux system,

cd $BIRCH/local/bin-linux-intel
ln -s /usr/java/jdk1.5.0_06/bin/java java

Remember, these steps are only necessary if java is not already present in the $PATH.

Please send suggestions of comments regarding this page to