[an error occurred while processing this directive]
Domain for sale!
Start Search Contents Index Links About

Getting started

Download

If you have not downloaded the JDK yet, now is the time to do it. Go to Sun's site and find JDK 1.5 for your OS. While you are downloading, you should also take the time to get the Java API Documentation (at the bottom of the page). This is indeed an important part of your programming environment, and you should get hold of this before your go on with the programming.

Installing

Once you have downloaded the JDK and documentation, install it to c:\jdk1.5 (or if using Linux, your preferred location, e.g /usr/local). Unzip the API Docs to the root of the c:\jdk1.5 directory.

For the advanced users, be aware that the source code of all the Java classes is included in the JDK packaged in the archive src.jar, which is located in the directory of jdk1.5. To unzip this archive, use the jar utility of Java: jar -xf src.jar or open the file in WinZip.

Configuring

The final configuring that remains is the setting of the "classpath". For your own code, you could for example create a directory c:\java\packages to store the packages you develop.

You can now set the classpath by typing set classpath=c:\java\packages;. (Please mind the dot after the semicolon, which indicates the current directory). In Linux you will usually type export CLASSPATH=/home/foo_user/java/packages:.

Editors

When it comes to the choice of an editor or IDE (Integrated Developer Environment), at lot of good ones have been developed over the last years, and some of the best are free, open source projects. Eclipse is IBM's initiative, while Netbeans is the Sun backed IDE. In fact, you can get the Java JDK and Netbeans bundled from Sun's Java download page. Both developer environments are for advanced users, and if you are new to Java, it might be worth going for a simpler editor in the beginning.

The best editor for Windows I've come across is JPadPro/SitePadPro from ModelWorks. I have bought JPadPro for a reasonable fee on line, and would like to recommend this to the Windows users. For very small projects, you might also consider the all purpose editor UltraEdit Many Linux users also prefer Emacs; please consult Torstein Krause Johansen's web page about this program.

JDK 1.5 is here. What about older versions?

Most of the exercises will be compatible with JDK 1.4 or even older versions. However, some will focus explicitly on the new features of JDK 1.5 (Java 5.0), and will require you to download both this new JDK and API. You should not wait too long before downloading the newer version.

Other issues

If you have other problems getting started with your programming, please contact me and I will see what I can do to get you going.



site: Håvard Rast Blok
mail:
updated: 16 July 2010