Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bypassing non proxy hosts in JAVA_OPTS

Tags:

java

gatein

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.
like image 249
Yogesh Avatar asked Sep 09 '14 12:09

Yogesh


People also ask

What is non proxy hosts?

nonProxyHosts indicates the hosts which should be connected to directly and not through the proxy server. The value can be a list of hosts, each separated by a |, and in addition a wildcard character (*) can be used for matching.

Does Java use system proxy?

Java provides proxy handlers for HTTP, HTTPS, FTP, and SOCKS protocols. A proxy can be defined for each handler as a hostname and port number: http. proxyHost – The hostname of the HTTP proxy server.


1 Answers

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
like image 200
Saurfang Avatar answered Sep 30 '22 01:09

Saurfang