Configure Java environment on Windows

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:

>javac -version
javac 1.6.0_10

 Other sources:

http://vietpad.sourceforge.net/javaonwindows.html

http://jonas.ow2.org/doc/tutorial/src/html/configuration.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: