Network Problems Using Java 7 and Cisco VPN?

Today I had a hard time getting my brand new Perforce plug-in working in my brand new Eclipse 4.2, from home over the Cisco VPN. After a while I realized that it was not only the Eclipse and Perforce plug-ins that had changed. I was also using a brand new JDK 7. I also realized that I had already encountered this problem before, when trying to use a brand new build of Java Mission Control 5 to hook up to a JVM at work:

  • The Cisco VPN seems to have some IPv6 related issue.
  • In JDK7 Java took the leap and started using IPv6 by default.
  • To revert to using IPv4 by default, set -Djava.net.preferIPv4Stack=true

For Eclipse, you can just add -Djava.net.preferIPv4Stack=true on a separate line in the eclipse.ini file, somewhere after â€“vmargs.

Leave a Reply

Your email address will not be published.