Jboss本身是支持IPv6的,但是在Linux下,必须把JDK升级到6.0以上,而且需要把run.sh的59行到61行注释掉:
run.sh
# Force IPv4 on Linux systems since IPv6 doesn't work correctly with jdk5 and lower
#if
[
"$linux" = "true"
]
;
then
# JAVA_OPTS
=
"
$JAVA_OPTS -Djava.net.preferIPv4Stack=true
"
#fi
不管在Window还是Linux下,启动参数中必须加上-b 0.0.0.0
对于JMS,IPv6地址不能通过IP来绑定,这是因为IPv6的地址中有冒号;在Jboss的JNDI中,会认为冒号以后的是端口。所以只能用域名或者是机器名绑定,例如localhost:8080
run.sh
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
不管在Window还是Linux下,启动参数中必须加上-b 0.0.0.0
对于JMS,IPv6地址不能通过IP来绑定,这是因为IPv6的地址中有冒号;在Jboss的JNDI中,会认为冒号以后的是端口。所以只能用域名或者是机器名绑定,例如localhost:8080