concept JDK in category ant

This is an excerpt from Manning's book Ant in Action.
This time the <javac> task does compile the source file, a fact it prints to the log. It still skips the build.xml file, printing this fact out before it actually compiles any Java source. This provides a bit more insight into the workings of the task: it builds a list of files to compile, which it passes to the compiler along with Ant’s own classpath. The Java-based compiler that came with the Java Development Kit (JDK) is used by default, running inside Ant’s own JVM. This keeps the build fast.
Before installing Ant, check that a Java SE Software Development Kit, otherwise known as JDK, is installed on the target system. Type javac at a command prompt; if a usage message doesn’t appear, then either a JDK needs to be installed or the PATH environment variable path isn’t set up correctly. Sun distributes their versions under http://java.sun.com/javase/—you need to download the appropriate JDK for your system.
On Windows, install the JDK on a path without spaces in it, such as c:\java\jdk, instead of a path such as C:\Program Files\Java. Spaces in paths can confuse Ant and other programs.
After installing the JDK, Ant requires the environment variable JAVA_HOME to be set to the directory into which it was installed. You should also append JAVA_HOME\bin to the PATH environment variable, so that you can run the SDK’s programs from the command line. Some Ant tasks depend on this, since they run these programs.
With JPackage, the JDK will be installed somewhere like /usr/lib/jvm/jdk_sun_1.5.10; with a Sun RPM, the destination is something like /usr/java/jdk_1.5.10. To stop this value from changing every time you update the JDK, set up a symbolic link, such as /usr/lib/jvm/jdk, to point to the JDK you want to use. Then set up the login scripts of yourself—or all users in the system—to have the JAVA_HOME environment variable set to this location. In the bash script language, it would be something like
export JAVA_HOME=/usr/lib/jvm/jdkYou should also add the bin subdirectory of the JDK to the PATH environment variable.
To test for the JDK, you should try running java first: