Java SE and Eclipse: Set up
Gene De Lisa
Introduction
You can set up a great Java development environment for free. Sun provides a Java developer Kit for multiple platforms for free. Eclipse is a very popular open source IDE project. There are other free IDEs available such as JDeveloper and Netbeans but we will focus on Eclipse here.
Download Java SE (Standard Edition)
Visit the Sun Java SE download site and choose the JDK and not the JRE. The JRE is just the runtime environment and does not include the things developers need. The JDK contains the JRE. The version number you see may be more current than the one shown here. In the past Java SE (JSE) was known as J2SE. (Java 2 Standard Edition)
The download link will take you to a page that lists the available JDKs for different platforms. If you are on a wireless connection or are going to install the JDK on multiple machines you probably want to download the "Online" installation bundle which is over 200 megabytes. Otherwise choose the Offline installation. If you have a Macintosh you will need to go to the Apple Java site to download.
On the same download page you can also download the documentation for Java SE. You will refer to these "javadocs" frequently so it is a good idea to have a local copy. The standard installation location will be a directory named docs under the JDK installation directory (e.g. C:\Program Files\Java\jdk1.5.0_06\docs)
Download Eclipse
Go the Eclipse download site and choose the current version. Right now the current zip download for Windows is named eclipse-SDK-3.1.2-win32.zip and is around 100 megabytes.
Eclipse is updated frequently. To help organize your installation create a special eclipse directory (e.g. c:\eclipse or /usr/devel/eclipse). Copy your zip file there and unzip it into a directory with the zip file's name. On windows I right click and WinZip or WinRar will present a context menu with this choice. Once you have it extracted you can either delete or archive the zip file.
To run Eclipse navigate to C:\eclipse\eclipse-SDK-3.1.2-win32\eclipse and double click on eclipse.exe. I create a desktop shortcut (or a Unix soft link to a shell script) for convenience. You can specify command line arguments in the shortcut properties (right click on the shortcut and choose properties). I use the -data flag to specify my workspace (the containing directory of my projects and my preferences). You can also tune Eclipse's memory management by specifying minimum and maximum stack/heap sizes. The -showlocation flag displays the location of the workspace in the title bar so you don't get lost. I usually have several of these shortcuts pointing to different workspaces.
There! You have a very productive environment for Java development. You can easily code, run and debug your Java programs. If you want to go beyond Java SE and develop Web applications or other Java Enterprise Edition APIs you will need to download the appropriate plugins. There are many available for free. You can search them at this popular site. There are also commercial plugins available. Websphere Studio Application Developer and Rational Application Developer are products that are really extensive sets of plugins. There are lower cost (and lower quality) plugin sets availabe too such as the popular MyEclipse.