November 11, 2016

How to set Proxy for Java Process, e.g. JBoss

For all Java process you can set proxy settings from command line:

-Dhttp.proxyHost=localhost -Dhttp.proxyPort=8080 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=8443

For details see: Java Networking Properties

For JBoss EAP 6 >, you can set this with:

<server xmlns="urn:jboss:domain:1.7">
    <extensions>
        ...
    </extensions>
    <system-properties> 
        <property name="http.proxyHost" value="localhost"/>
        <property name="http.proxyPort" value="8080"/>
        <property name="https.proxyHost" value="localhost"/>
        <property name="https.proxyPort" value="8443"/>
    </system-properties> 
    <management>
</server>

No comments: