I need to set java.net.preferIPv4Stack=true to an app started via JNLP (javaws and applet)
Tried those, without luck…
<j2se ...java-vm-args="-Djava.net.preferIPv4Stack=true" />
<property name="java.net.preferIPv4Stack" value="true"/>
System.setProperty("java.net.preferIPv4Stack", "true");
The only way i could make it work was seeting when launching javaws from local filesystem:
javaws -J-Djava.net.preferIPv4Stack=true myapp.jnlp
What is not possible on a applet or URL.
How should i set this property?
With the Java 7 Update 6 (b17) the list of secure properties has been updated. See Bug Report 716069 for further Details.
You can include this setting by specifying the following line within the resource tag:
<property name="java.net.preferIPv4Stack" value="true"/>