问题描述:

Using Java 7 Update 5 always causes complications with Java apps (for me, notably MineCraft) because it attempts to use IPv6. Disabling IPv6 doesn't save this at all.

Every bit of information I found keeps saying to use a batch file to tell java to start the program with the "-Djava.net.preferIPv4Stack=true" parameter. This does fix my problem, but I would like to not start things with batch files.

Is there a way to set this for Java 7 globally? I've gone to the Java Control panel in the Java tab and set "-Djava.net.preferIPv4Stack=true" as a runtime parameter for Java 7 but it doesn't do anything.

Help me, you are my only hope. I would really like to stop using Java 6.

网友答案:

I have the same IPv6 issues with my development box at the office.

Go into your Environment Variables dialog from the Control Panel and create a new System variable called JAVA_OPTS and set the value to be -Djava.net.preferIPv4Stack=true.

相关阅读:
Top