Install and configure Eclipse for Java EE development

Introduction

Eclipse is a great open-source Integrated Development Environment that supports a lot of languages..

Install a Java Development Kit

For JavaEE work, I currently prefer JaveSE.

  1. Browse to Oracle’s Java SE Development Kit downloads
  2. In the section titled Java SE Development Kit 8u45, read the license and, if you agree, click Accept License Agreement
  3. Still in that section, click on jdk-8u45-windows-x64 (or the right download for your OS)
  4. Run the downloaded JDK installer, using Run As Administrator
  5. Add the Windows (or Linux) Environment Variable JAVA_HOME. Set it to the root folder of your newly-installed JDK, which for me is C:\Program Files\Java\jdk1.8.0_51
  6. If you are working behind a proxy, you have my sympathy. Set these additional Environment Variables
    1. HTTP_PROXY to your proxy server and port.  Something of the form http://myproxy:911
    2. HTTPS_PROXY to the appropriate server and port.  Something of the form  http://myproxy:911
    3. NO_PROXY to a comma-separated (on Windows) list of sites that are not on a proxy.  Something like localhost,*.mycorp.com

Install Eclipse MARS for Java EE

  1. Browse to Eclipse Downloads
  2. In the dropdown menu on the right, select your OS
  3. Click on the Eclipse version you want.  I choose Eclipse IDE for Java EE Developers, Windows 64 bit.
    1. Note: the width (32 bit or 64 bit) must match the width of your installed JDK.  You installed jdk-8u45-windows-x64 above, so download the 64-bit Eclipse.
  4. Unzip the downloaded zip file to somewhere it can run.  For example, C:\Users\YourLogin\Documents
    1. I prefer putting Eclipse under my Windows Documents folder because in the past I’ve had permissions/plugin issues if I installed Eclipse in C:\Program Files or elsewhere directly under C:
  5. The eclipse.exe file in the unzipped folder is the runnable Eclipse.  Pin this to your taskbar or start menu, or create a desktop shortcut for it.
    1. Note: multiple versions of Eclipse can co-exist if necessary.  You just need to remember which is which.

Configure Eclipse

  1. If you are behind a proxy, set the Eclipse Proxies to match:
    1. Start Eclipse
    2. Select Window / Preferences
    3. Select General / Network Connections (that is, expand the General section and click on Network Connections)
    4. For Active Provider, select Manual.  In my experience, Eclipse has never been able to use the Native OS proxy settings.
    5. Set HTTP to your proxy and port as when you set up Java. Something like http://myproxy and 911
    6. Set HTTPS to the appropriate server and port, as when you set up Java.
    7. If you have a SOCKS proxy, set it here.
      1. NOTE: If SOCKS proxy is checked, make sure to set the proxy to something. It seems that a checked but empty Eclipse SOCKS proxy gives Maven some issues.
    8. Click OK
    9. Create a folder named lib under your Eclipse root folder.  Something like C:\Users\YourLogin\Documents\eclipse\lib  Do this to avoid Tomcat server errors later on.