Setting up an Eclipse-based Java Development Environment on WinXP (Part 1)

Posted : June 29, 2004 at 7:48 pm [America/Los_Angeles]

Goal:

  1. To set up an Eclipse-based development environment in order to facilitate Java development of standalone applications and/or web-based applications
  2. Focus on getting the development environment set up with the right tools once, thereby freeing the developer to focus on his/her real challenge - writing code

Assumption:

The goal here is not to present the “one-and-only perfect” way there is of setting up a development environment on WinXP. It’s just “a” way of doing it.

Folder structure:

I tend to keep my OS on C:\ and my applications on D:\. If you just have a single C:\ drive on your PC, replace D:\ with C:\ everywhere in the rest of this blog entry:

Software Requirements:

Note:

Install all these softwares in D:\development-root\tools (and not the usual D:\Program Files\) in order to make it visually easier for you to know which softwares/tools are installed for development purposes.

  1. JSDK (latest stable version: 1.4.2_04)
  2. Ant (latest stable version: 1.6.1)
  3. (Optional) Ant plugins - Checkstyle (latest stable version: 3.4), Java2Html (latest stable version: 4.1), PMD (latest stable version: 1.8) and JUnit (latest stable version: 3.8.1)
  4. Eclipse (latest stable version: 3.0)
  5. Eclipse plugins:
    • MyEclipse (commercial, latest stable version: 3.8 beta1) For J2EE development. Note: I primarily use it as a JSP, Javascript, CSS, TLD, DTD editor
    • XMLBuddy For XML file editing.
    • Colorer Basically a general-purpose syntax highlighter (supporting bazillion formats and languages)
    • GEF (Graphical Editing Framework). Pre-requisite for Spring UI plugin (see the next entry).
    • Spring UI plugin. Install it if you’re planning on using Spring API in your development. Install using Eclipse’s Update Manager:

      Help -> Software Updates -> Find and Install… -> Search for new features to install -> Add Update Site…

      Name : Spring IDE

      URL: http://www.springframework.org/spring-ide/eclipse/

    • Easy Explorer. For quick access to Windows explorer from within Eclipse. Install it using Eclipse’s Update Manager:
      Help -> Software Updates -> Find and Install… -> Search for new features to install -> Add Update Site…

      Name : Easy Explorer

      URL: http://easystruts.sourceforge.net/eclipse/updates/site.xml

    • Jalopy (commercial, latest stable version: 1.2)
    • VeloEclipse. Install it if you’re planning on using Velocity templates in your development. Install using Eclipse’s Update Manager:

      Help -> Software Updates -> Find and Install… -> Search for new features to install -> Add Update Site…

      Name : VeloEclipse

      URL: http://propsorter.sourceforge.net/veloeclipse

    • RegEx Tester Install it if you’re planning on using Regular expressions a lot in your development.
  6. Tomcat (latest stable version: 4.1.30 or 5.0.25)
  7. Tortoise CVS (latest stable version: 1.6.14)

Installation notes:

Instead of boring you with obvious details about how to install JSDK or Eclipse, I will just make a few points in general:

Post installation notes:

At this point, you should have all the softwares downloaded and installed. There’s just two more things that I often do which I think you’ll find useful as well. However, before I proceed, let me warn you - I am a huge fan of Windows Quick Launch Bar. If you don’t use it at all, tweak the explanations given below accordingly to make it work with your desktop shortcuts or whatever other mechanism you use to invoke a software on Windows.

  1. Create a Quick Launch Bar shortcut for D:\development-root\tools\eclipse-3.0\eclipse.exe. Right-click on the Eclipse icon on the Quick Launch Bar, select Properties and you will see the following in your Target: textfield:

    D:\development-root\tools\eclipse-3.0\eclipse.exe

    Replace it with:

    D:\development-root\tools\eclipse-3.0\eclipse.exe -vm “C:\Program Files\Java\j2re1.4.2_04\bin\javaw.exe” -vmargs -Xverify:none -XX:+UseParallelGC -XX:PermSize=20M


    Of course, if your JVM path is different, tweak is accordingly in the entry above. I got this tip from Matt’s blog. However, I can’t seem to get the exact entry as his search seems to be messed up. Oh well..

  2. Create a Quick Launch Bar shortcut for D:\development-root\tools\Tomcat-4.1.30\bin\startup.bat and D:\development-root\tools\Tomcat-4.1.30\bin\shutdown.bat. This allows me to quickly start and stop Tomcat instance. This is why I don’t prefer installing Tomcat as a service.

That’s it for Part 1 of this entry. In Part 2, I will talk about configuring Eclipse and setting up two Eclipse projects: a standalone Java application and a Struts-based (struts-example, part of Struts download) application.

Enjoy!

- Anand

Viewed: 3379 times

4 Comments

I find this verry interesting. what i also try to do is to seperate the extra plugins from the eclipse directory and in that directory I have two subdirs. One for the eclipseplatform itself (VEP, EMF etc.) and one for custom plugins (Jfacedbc, etc.).

I was wonderingin though. How do you let eclipse know where the config dir is if it is not in a sub directory of eclipse?

cheers Rolf

Posted by: Rolf at June 30, 2004 @ 10:36 pm

Rolf:

Interesting point about seperating out the plugins.

As for storing the Eclipse config, I guess my entry was not very clear. I did not mean that I store the config outside of the ECLIPSE_HOME (D:\development-root\tools\eclipse-3.0) and make Eclipse read it from there. What I really meant was that I store a backup/export of my Eclipse config in ‘eclipse-config’ directory so that I can use it for other Eclispe install. Apologize for the confusion. Will update the entry soon to reflect that.

Also, I would really like to know how you seperate out the plugins that you install and keep them outside of ECLIPSE_HOME.

Thanks for the comment.

- Anand

Posted by: Anand Sharma at June 30, 2004 @ 11:53 pm

Anand,

It is quite simple with one issue I’m still trying to fix but it works if you do it like this.

Create in the eclipse_home dir a new directory called links. In here you can create as many files as you want to link different plugin directories. mine are called eclipse-platform.plugins and eclipse-addon.plugins.
In those files I set the following text:
path=<pathwithforwardslashestospecificplugindir>
This is handy when you do an upgrade an do not want to remove the plugins you are using (If the plugins still work for that version of eclipse that is).

The issue is that i must install the plugin by hand before i can use update. Otherwise the new plugin will be installed in the default plugindir under eclipse_home.

Rolf

Posted by: Rolf at July 1, 2004 @ 12:21 am

Thanks Rolf. Will check it out and let you know if it works out well.

- Anand

Posted by: Anand Sharma at July 1, 2004 @ 1:16 am