javaws:Java 7 更新 45.无法发送属性 [英] javaws : Java 7 update 45. Cannot send properties

查看:16
本文介绍了javaws:Java 7 更新 45.无法发送属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在新的 Java 7 更新 45 中,我们无法设置属性.我们以前是这样设置的

...<jar href="xxx.jar"/><属性名称=xxx.xxx.xxx.xxx.userName"值=蝙蝠侠"/><property name="xxx.xxx.xxx.xxx.locale" value="en_US"/>...</资源>

我们尝试了解决方法,尝试了以下方法

...<jar href="xxx.jar"/><property name="jnlp.xxx.xxx.xxx.xxx.userName" value="Batman"/><property name="jnlp.xxx.xxx.xxx.xxx.locale" value="en_US"/>...</资源>

甚至尝试过javaws".添加为前缀.

问题是我们希望避免在代码库中进行更改,并希望在 jnlp 级别解决问题.

我们有其他解决办法或想法吗?

解决方案

根据此 OpenJDK 错误报告 (https://bugs.openjdk.java.net/browse/JDK-8023821) 有三种可能的解决方法:

<块引用>

  1. 签署 jnlp 文件.使用签名的 jnlp 文件 (JNLP-INF/APPLICATION.JNLP) 或签名的 jnlp 模板 (JNLP-INF/APPLICATION_TEMPLATE.JNLP).

  2. 使用安全属性.将 jnlp 文件中的所有属性更改为前置jnlp".到属性名称,并修改所有代码以使用新的属性名称.

  3. 使用安全属性并将它们在签名应用程序的主体中转换为不安全的属性.更改 jnlp 文件,使 jnlp 文件中的属性名称以jnlp.myapp."开头,然后在您的应用程序中读取系统属性并为每个以jnlp.myapp."开头的属性.设置没有jnlp.myapp."的相应属性.前置于名称.

听起来 2 和 3 不是您想要的.因此,您只剩下选项 1.(或者接受您需要更改代码库.)

With the new Java 7 update 45, we are not able to set properties. We used to set it as follows

<resources>
    ...
    <jar href="xxx.jar"/>
    <property name="xxx.xxx.xxx.xxx.userName" value="Batman"/>
    <property name="xxx.xxx.xxx.xxx.locale" value="en_US"/> 
    ...
</resources>

We tried the work around, tried the following

<resources>
    ...
    <jar href="xxx.jar"/>
    <property name="jnlp.xxx.xxx.xxx.xxx.userName" value="Batman"/>
    <property name="jnlp.xxx.xxx.xxx.xxx.locale" value="en_US"/> 
    ...
</resources>

even tried "javaws." added as prefix.

Problem is we that we want to avoid making change in the codebase and want to fix the issue in the jnlp level.

Do we have any other work around or any ideas?

解决方案

According to this OpenJDK bug report (https://bugs.openjdk.java.net/browse/JDK-8023821) there are three possible workarounds:

  1. Sign the jnlp file. Use either a signed-jnlp file (JNLP-INF/APPLICATION.JNLP) or a signed jnlp template (JNLP-INF/APPLICATION_TEMPLATE.JNLP).

  2. Use secure properties. Change all the properties in the jnlp file to pre-pend "jnlp." to the property name, and modify all code to use the new properties name.

  3. Use secure properties and translate them in the main of your signed application to insecure properties. Change jnlp files to have the property names in the jnlp file pre-pended with "jnlp.myapp.", then in your application read the system properties and for each property starting with "jnlp.myapp." set the corresponding property without the "jnlp.myapp." pre-pended to the name.

It sounds like 2 and 3 are not what you want. So that leaves you with option 1. (Or accept that you need to change your codebase.)

这篇关于javaws:Java 7 更新 45.无法发送属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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