How To Configure STS To Use Proxy Server

If you use STS (Eclipse Kepler) behind a firewall it can prevent you from downloading eclipse plugins or patches.  To be able to connect to Eclipse Market Place or Link to install new software you would need to tell STS about the proxy server.  Proxy servers are usually the way to access outside network when in company network.  There are two ways to have proxy server.

Here are the steps if you do it from STS.

  1. Windows -> Preferences -> General -> Network Connectivity
  2. In the Active Provider Drop down, select Manual.
  3. You can see HTTP and HTTPS schema.  Click on the Edit button.  You can see the followingProxy setting in Eclipse
  4. Add the proxy server host name or ip address and the port number. Click OK to save.  Similarly add for HTTPS also.
  5. Now you can try to access the Eclipse Market place and see if that works.
  6. In case it does not work there is another way to set the proxy server.  Go to the STS installation directory and edit the STS.ini.
  7. Add the following entries

-Dhttp.proxyPort= port number of the proxy server
-Dhttp.proxyHost=proxy server host name

Save the file and restart the STS.  You should now be able to access the eclipse marketplace through the STS.

How To Add Support For Java 8 in STS (Kepler)

If you are using STS or Keplet on which it is based previous to 3.5.1 version and install JDK 8 you may not be able to use Java 8.  To be able to use Java 8 your eclipse needs Java 8 patch.  In this tutorial I will show how to install Java 8 patch.  Here are the steps.

  1. Of course you need to install JDK 8.   Next set the JAVA_HOME system variable to Jdk 8 install directory.
  2. Next click on Help -> Eclipse Marketplace…
  3. Eclipse Marketplace wizard will open and in the search box type Java 8 kepler (STS uses Kepler Eclipse).  Press enter and it will bring up options as you can see in the screen shot below.  In case eclipse is not able to connect to marketplace the proxy server setting may be required. For that you can read how to setup proxy server in STS tutorial.

java8sts

4. The following are required –

  • Java 8 facet for web tools for Eclipse Kepler SR2
  • Java 8 support for  Eclipse Kepler SR2
  • Java 8 support for m2e for Eclipse SR2 (See the screenshot below)

java8sts2

5. Select the first option and Click Install. It will show a pop up with Confirm Selected Features.  Since we want to select more click on <Install More.  It will go back to the previous screen and now you can select the other two.  Click on Install Now>.  Click confirm.

6. Software installation will start as below.

java8sts3

7.  Once installation is done STS needs to be restarted.  You will get a screen as below.  Click on Yes.

java8sts4

8.  Once STS restarts you can confirm if STS has access to Java 8 by following steps.  Windows -> Preferences -> Java -> Compiler.  You should now be able to see 1.8 for the Compiler compliance level:

java8sts5

Happy coding.