1

I have 3 lines of code, I need to add them to Eclipse JVM configuration in order to not having to write them everytime in every program I develop. These are the three lines:

System.getProperties().put("proxySet", "true");
System.getProperties().put("proxyHost","prxoy.com");
System.getProperties().put("proxyPort", "8080");

Any idea how to make it work?

2 Answers 2

2

Open Preferences, then navigate the tree to Java -> Installed JREs.

From there you can then Edit your chosen/default JRE and add your System Properties by entering them into the Default VM Arguments field, e.g.:

-DproxySet=true -DproxyHost=prxoy.com -DproxyPort=8080
Sign up to request clarification or add additional context in comments.

1 Comment

@AouesGuesmi Yes the format is -Dkey=value -Dkey=value etc... Take a look at the Eclipse help for clarification - there are screen shots included.
0

Alternatively, you can configure proxy host and port under Network Connections

Preferences >> General >> Network Connections 

Select Active provider as 'Manual' and update/edit the proxy host and port.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.