在JAVA_选项中绕过非代理主机

在JAVA_选项中绕过非代理主机,java,gatein,Java,Gatein,我在standalone.conf.bat中添加了非代理主机,以获取门户服务器 -Dhttp.proxyHost=10.111.1.00 -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=localhost|127.0.0.1|172.16.31.* " 当我启动服务器时,出现以下错误 c:\jboss-jpp-6.1.0\jboss-jpp-6.1\bin>standalone.bat Calling "c:\jboss-jpp-6.1.0\jboss-

我在standalone.conf.bat中添加了非代理主机,以获取门户服务器

-Dhttp.proxyHost=10.111.1.00 -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts=localhost|127.0.0.1|172.16.31.* "
当我启动服务器时,出现以下错误

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.

我不能留下评论,因为我没有足够的声誉。在Windows中将其设置为环境变量时,我也遇到了这个问题。事实证明,您需要使用^来转义|字符

所以这对我有效

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

试着用引号括住JAVA_选项。我不想离题,但我真的很好奇:为什么特别是1303兆的内存,而不是1300兆的内存?但不是OP在编辑之前的方式。在Windows上,SET JAVA_OPTS=“a | b”将在%JAVA_OPTS%的扩展中包含引号,从而正确地传递给JVM
“SET JAVA_OPTS=a | b”
将扩展到未加引号的
a | b
,这将无法按需要工作。Unix则不同。