After installing Java Development Kit on Windows, you may still need to do some configuration to get Java ready for compiling and executing Java programs. The following instruction will guide you through the process of setting up JDK for software development.
JDK is typically installed under C:\Program Files directory. For Java 6 Update 10, its installation folder will be C:\Program Files\Java\jdk1.6.0_10. Perform the following steps to make Java tools accessible.
Click Start > Control Panel > System icon to open System Properties dialog box.
Click Advanced > Environment Variables.
Click New button in System variables panel and create JAVA_HOME and CLASSPATH variables with values as shown:
While at it, you may also want to set up and configure for Apache Ant, a tool widely used in building and executing Java applications. You may need to move and/or rename Ant’s installation folder.
Edit the Path variable to make the Java compiler and associated tools available by appending to its existing value the string “;%JAVA_HOME%\bin;%ANT_HOME%\bin;”.
You can verify the availability of Java compiler by executing the following command in the command window: