Setting up Java EE and Eclipse on Microsoft Windows

Setting up Java EE with Eclipse is pretty simple. Following are the steps:

  1. Download Java EE Development Kit with JDK from Oracle. Choose a version that includes the GlassFish server.
  2. Double-click and install. Assuming that you installed at c:\glassfish3.
  3. Download Eclipse IDE for Java EE Developers from eclipse.org
  4. Unzip to c:\
  5. Open command prompt by clicking of the start icon and typing cmd in the search field. Press enter.
  6. Type cd c:\eclipse
  7. By default, eclipse only looks for JRE within its folders, so you need to specify the location on your JRE. To do this, type
    eclipse -vm c:\glassfish3\jdk\jre\bin\bin\javaw.exe
  8. Obviously, you would not want to run this long command every time. So you need to change eclipse.ini settings. Open c:\eclipse.ini with a non-formatting editor like notepad.
    Add the following just above lines above --vmargs
    -vm
    c:\glassfish3\jdk\jre\bin\javaw.exe
    and save the changes.
  9. Your eclipse.ini should look like the following:
    -startup
    plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
    --launcher.library
    plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502
    -product
    org.eclipse.epp.package.jee.product
    --launcher.defaultAction
    openFile
    --launcher.XXMaxPermSize
    256M
    -showsplash
    org.eclipse.platform
    --launcher.XXMaxPermSize
    256m
    --launcher.defaultAction
    openFile
    -vm
    c:\glassfish3\jdk\jre\bin\javaw.exe
    -vmargs
    -Dosgi.requiredJavaVersion=1.5
    -Xms40m
    -Xmx512m
  10. double-click on the eclipse.exe icon to start eclipse. You might also want to add a shortcut to the desktop.