如何为JNLP app设置preferIPv4Stack属性? [英] How to set preferIPv4Stack property for JNLP app?

查看:600
本文介绍了如何为JNLP app设置preferIPv4Stack属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将java.net.preferIPv4Stack = true设置为通过JNLP启动的应用程序(javaws和applet)

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");

从本地文件系统启动javaws时,我能使它工作的唯一方法就是发送:

The only way i could make it work was seeting when launching javaws from local filesystem:

javaws -J-Djava.net.preferIPv4Stack=true myapp.jnlp

小程序或URL上不可能有什么。

What is not possible on a applet or URL.

我应该如何设置此属性?

How should i set this property?

推荐答案

使用Java 7 Update 6(b17),安全属性列表已更新。有关详细信息,请参见错误报告716069

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.preferIPv4Stackvalue =true/>

这篇关于如何为JNLP app设置preferIPv4Stack属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆