Java Environment for LHCb


The only package written in java in the Gaudi framework is at this time the XmlEditor package. These instructions are thus only intended to those using this package, others can forget java right now.

This page explains how to use java on your computer, either at CERN or outside CERN. This is not particular to the Gaudi environment but is the way every java environment must be set up.


We make a difference here between the CERN and the rest of the world. You should however not take it too seriously. The CERN is in fact all place where you have an access to the CERN afs, whereas the rest of the world is either places where you don't have access to the CERN afs or places where you don't want to use it (maybe because it is too slow).
Even if you are at CERN, you can use the outside CERN installation. It won't hurt and it will let you be independant of the afs network, at least in the java domain.

Outside CERN

The only difference with the CERN case is that you have to install a JDK on your system first whereas it is already installed on the afs at CERN. You can download the one you want, providing it is version 1.2.2 or later.
Here are few places where you can find some : Sun jdk1.3blackdown jdkIBM jdk.
Once it is downloaded and installed using the documentation provided with the jdk you choose, just run the same steps as if you were inside the CERN with your JAVALOCATION variable pointing to your new jdk installation.


The first step is to setup an environment variable referencing your java installation. I will call it JAVALOCATION. It has to be set to :
Here *operating_system_name*is one of i386_redhat61, sparc_solaris26 and win32 (Note that i386_redhat61 can be used for any linux system). Concerning the *jdk_you_want_to_use*, the only thing is to choose a version 1.2.2 or higher. So, if you're running on linux, you can choose (at the time this documentation was written) : blackdown-1.2.2, blackdown-1.3.0, blackdown-1.3.0rc1, ibm-1.3.0, sun-1.3.0 or sun-1.3.0rc1. On windows, the choice is : ibm-1.2.2, ibm-1.3.0, sun-1.2.2 or sun-1.3.0. Of course, you'd better take the last version since many bugs are corrected. Besides, you may avoid the sun version on linux since there is a bug that prevents you from using the drag and drop functionnalities. I would thus choose ibm-1.3.0 or blackdown-1.3.0rc1 on linux and ibm-1.3.0 on windows.

Then you have to define correctly your PATH and CLASSPATH variables. Add ${JAVALOCATION}/bin to your PATH and ${JAVALOCATION}/jre/lib/rt.jar:${JAVALOCATION}/lib/dt.jar:${JAVALOCATION}/lib/tools.jar to your CLASSPATH. Take care that I gave here the linux syntax, the windows one should be %JAVALOCATION%/bin and %JAVALOCATION%\jre\lib\rt.jar;%JAVALOCATION%\lib\dt.jar;%JAVALOCATION%\lib\tools.jar.

That's all, java should work now.

This page last edited by SP on May 16, 2002.