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 9.0.1, read the license and, if you agree, click Accept License Agreement
  3. Still in that section, click on jdk-9.0.1_windows-x64_bin.exe (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 Oxygen for Java EE

  1. Browse to Eclipse Downloads
  2. Click on the Download button under Get Eclipse Oxygen.
  3. On the resulting page, click on the Download button.
    1. Note: the width (32 bit or 64 bit) must match the width of your installed JDK.  You installed jdk-9.0.1_windows-x64 above, so download the 64-bit Eclipse.
  4. Run the downloaded installer using Run as Administrator.
  5. Choose the version of Eclipse you wish to install. I prefer Eclipse IDE for Java EE developers for Java work.
  6. If the installation fails, try again with realtime virus scanning temporarily turned off. Remember to  turn it on  again when you’re done.

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.