Search code examples
javagatein

Bypassing non proxy hosts in JAVA_OPTS


I am adding non proxy hosts in standalone.conf.bat of getting portal server by

-Dhttp.proxyHost=10.111.1.00 -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=localhost|127.0.0.1|172.16.31.* "

and when i am starting the server getting following error.

c:\jboss-jpp-6.1.0\jboss-jpp-6.1\bin>standalone.bat
Calling "c:\jboss-jpp-6.1.0\jboss-jpp-6.1\bin\standalone.conf.bat"
'127.0.0.1' is not recognized as an internal or external command,
operable program or batch file.

Solution

  • Can't leave a comment because I don't have enough reputation. I have also bumped into this question when I set this as an environment variable in Windows. It turns out you need to use ^ to escape | character instead.

    http://www.robvanderwoude.com/useless.php#EscapeChar

    So this worked for me

    -Dhttp.nonProxyHosts=localhost^|127.0.0.1^|*.foo.com