Installing Java
You can easily check the version of Java that is available on your system. Open a terminal window and enter the following command:
java -version
This will display the version information for Java. You need to have 1.5 or higher. If you do not, then you must upgrade. The current version of Java can always be downloaded from the following site:
You should choose to download the “Java SE 5 JDK”. If a later version of Java is available, you may choose to download that instead. You do not need to download the version that includes NetBeans, unless you plan on using NetBeans.
You should download the JDK to your home directory. Sun Microsystems distributes JDK for Linux as a bin file that contains an RPM file. You must run the bin file to obtain the RPM file. To run the bin file, execute the following command from a terminal window inside your home directory:
chmod +x jdk-1_5_0_09-linux-i5860rpm.bin
This will give you permission to execute the bin file. If you are using a different version, remember to adjust the filename. Next, run the bin file with the following command:
./ jdk-1_5_0_09-linux-i5860rpm.bin
This will display a long license agreement from Sun Microsystems, as seen in Figure D.1.
Figure D.1: Java License Agreement

Enter “yes” for the agreement if you agree to the terms. You now have an RPM file to install. Become the super user with the following command:
su
Enter the super user password. You are now ready to install the RPM. Use the following command to install the RPM.
rpm -iv jdk-1_5_0_09-linux-i586.rpm
Once you have Java installed, install Apache Ant.




