Chapter 3. Configuring Your Environment

In this chapter, we will put all the pieces together that are required to configure a complete J2EE platform. Note that you can find a more detailed description in the documentation provided with each software component.

3.1. Setting Up Your Java Environment

To set up your Java environment, you must set the value for JAVA_HOME and update the PATH environment variable. JAVA_HOME must point to the SDK directory and PATH must point to the bin subdirectory of the SDK.

Note

Environment variables must be correctly set at all times. It is common practice to insert these commands in your shell start file (~/.bashrc).

3.1.1. Configuring Ant

You have to set the ANT_HOME environment variable and update your PATH variable.

Assuming that you installed Ant in the /usr/share/ant directory, you should enter the following command:

bash> export ANT_HOME=/usr/share/ant

NoteNote
 

Make sure that the ant executable is available through the PATH. (Usually the ant executable is installed in /usr/bin.)

WarningWarning
 

If you want Ant to automatically set the CLASSPATH variable, you have to correctly set your JAVA_HOME environment variable as described in Section 3.1 Setting Up Your Java Environment.

3.1.2. Configuring Your JOnAS Environment

You have to set up the JONAS_ROOT environment variable prior to using JOnAS or any of its tools. You also have to update your PATH.

Assuming that you installed JOnAS in the /usr/share/jonas directory, enter the following commands:

bash> export JONAS_ROOT=/usr/share/jonas
bash> export PATH=${PATH}:${JONAS_ROOT}/bin/unix