2012-11-30

How to install the Java Developer Kit on Windows?

The first step is to download the installation package.
The file to get is the Java Developer Kit (JDK)
http://www.oracle.com/technetwork/java/javase/downloads/index.html

The second step is to execute the installer.

To compile and execute Java programs in the console, a few environment variables must be set.

Set JAVA_HOME to the installation folder.
For example, C:\Java\jdk\1.7.0_09

Then, edit the PATH variable, to add, in the beginning:
%JAVA_HOME%\bin;

Finally, to check if everything is OK, open a new console and execute the following commands that should print the installed Java version number:
javac -version
java -version 

That's it! Happy coding!

No comments: