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.
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.
Assuming that you installed the SDK in the /usr/local/jdk1.4.2 directory, you should enter the following:
bash> export JAVA_HOME=/usr/local/jdk1.4.2 |
You then have to update your PATH variable by appending /usr/local/jdk1.4.2/bin. If JAVA_HOME has been properly set, you can proceed as follows:
bash> export PATH=${PATH}:${JAVA_HOME}/bin |
Environment variables must be correctly set at all times. It is common practice to insert these commands in your shell start file (~/.bashrc). |
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 |
Note | |
---|---|
Make sure that the ant executable is available through the PATH. (Usually the ant executable is installed in /usr/bin.) |
Warning | |
---|---|
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. |
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 |