It turns out that if your Java app is getting IPv6 addresses back from InetAddress.getLocalHost().getHostAddress() you can use flags to the Java VM to control this behaviour
-Djava.net.preferIPv4Stack=true
if you only want IPv4 addresses returned, or
-Djava.net.preferIPv6Stack=true
if you need to test your code against IPv6 addresses. These flags are only valid when passed to the JVM when it’s started up (ie they can’t be changed once the App’s running).
Related posts:
- Java Update 1 kills QuickTime for Java Apple has released (via Software Update) “Java for Mac OS...
- dscacheutil is command of the day Having recently changed ISP, my command of the day is...
- QuickTime for Java doesn’t let you access B-frames From a a post to the QuickTime-Java mailing list, Apple’s...
- Java 6 on Leopard Fans of Java 6 who want to be able to...
- Building Universal Java App Bundles on Mac OS X So, if you’ve got a Java application bundle that’s built...
Related posts brought to you by Yet Another Related Posts Plugin.


















