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

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

问题描述

使用新的Java 7更新45,我们无法设置属性.我们以前将其设置如下

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>

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

even tried "javaws." added as prefix.

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

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?

推荐答案

根据此OpenJDK错误报告(

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

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

  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).

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

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.

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

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.

听起来好像2和3不是您想要的.这样就为您提供了选项1.(或者接受您需要来更改代码库.)

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天全站免登陆