Programming & Scripting Tutorials

Java: Setting Up Your Java Environment





Firstly you will need to download the newest version of the Java(SE) JDK and Netbeans (or another Java Integrated Development Environment) to get started with Java.
Go to http://www.java.sun.com and click on 'Java SE'; then download the package with the newest JDK packaged with netbeans.

Complete all installation as per usual, and then we will need to create a new system environment variable.
But first while your waiting for it to install lets talk about some of the pro's and con's of Java.
Java, as some of you may know is a lot like C++ (in fact it derived from C++), and they are both very useful languages, however java runs around 20 times slower that C++; However it has its advantages.
Java has a wonderful API, superb multi threading and exception handling and creates structured code.

Anyway back to the setup; once the installation has finished, steps will vary from OS to OS. If your on Windows, right click on 'My Computer', and then click properties. If you are on a Vista computer then click "Advanced system settings".
You should now have a little window on your screen; Click the advanced tab at the top, and then click "environment variables". Once on the environment variables screen click "new" (the bottom half of the dialog).
For the variables name type in:

JAVA_HOME


and for the variable value go to Program Files, then find your Java folder, then the directory were you installed Java, go into the "bin" folder then copy the path and paste into the variables value.
Mine looks like this:

C:\Program Files\Java\jdk1.6.0_17\bin


We now have your java environment set-up, and you can now start programming in Java!

This Java tutorial was written by


Back to Java

Advertisement: