qq123476556 发表于 2016-8-21 13:38:14

(已解决)启动时候报错,求助

本帖最后由 qq123476556 于 2016-8-22 13:41 编辑

错误如下

qq123476556 发表于 2016-8-22 13:41:34

原因已找到:如果不用mac的同学应该不会有这问题
This was caused by an IPv6 address being returned from java.net.NetworkInterface.getDefault(). I'm on a Macbook and was using wireless -- p2p0 (used for AirDrop) was returned as the default network interface but my p2p0 only has an IPv6 ether entry .
Two solutions, both of which worked for me (I prefer the first because it works whether you are using a wired or wireless connection)

Start the JVM with -Djava.net.preferIPv4Stack=true. This caused java.net.NetworkInterface.getDefault() to return my vboxnet0 network interface -- not sure what you'll get if you're not running a host-only VM.
Turn off wireless and use a wired connection

tankxxl 发表于 2016-8-24 16:42:49

这个问题具体是怎么解决的?我用的mac、idea、jetty:run。

tankxxl 发表于 2016-8-24 16:43:37


这个问题具体是怎么解决的?我用的mac、idea、jetty:run。

qq123476556 发表于 2016-8-24 21:54:17

tankxxl 发表于 2016-8-24 16:42 static/image/common/back.gif
这个问题具体是怎么解决的?我用的mac、idea、jetty:run。

FYI:
Start the JVM with -Djava.net.preferIPv4Stack=true.
右键项目-Run As-Run Configurations-Arguments-VM arguments

eclipse+tomcat

tankxxl 发表于 2016-8-25 16:50:24

qq123476556 发表于 2016-8-24 21:54 static/image/common/back.gif
FYI:
Start the JVM with -Djava.net.preferIPv4Stack=true.
右键项目-Run As-Run Configurations-Arg ...

Thanks a lot!!
页: [1]
查看完整版本: (已解决)启动时候报错,求助