[英]How can I force Java Web Start to run a self-signed JNLP?
We are developing an app that uses Java Web Start. 我们正在开发一个使用Java Web Start的应用程序。
When I try to start my JNLP file, I get this warning: 当我尝试启动我的JNLP文件时,我收到此警告:
The "Location" ( http://<IP>:port
) has been added to the Exception Site List. “位置”(
http://<IP>:port
)已添加到“例外站点列表”中。 I would have thought that this would in itself be enough to make the JNLP run. 我本以为这本身足以让JNLP运行起来。
However, I have also done the following under "Advanced": 但是,我还在“高级”下完成了以下操作:
I only have one Java version - it is Java 1.8.0_91, 32-bit. 我只有一个Java版本 - 它是Java 1.8.0_91,32位。
What more do I need to do to make my JNLP run? 我还需要做些什么来让我的JNLP运行?
The problem was that the Permissions attribute was missing in the manifest, and was therefore blocked without warning in Java 1.8. 问题是清单中缺少Permissions属性,因此在Java 1.8中没有警告就被阻止了。 The warning appears if you run Java 1.7.
如果您运行Java 1.7,则会出现警告。
Java security is a fun little thing to have to wrestle with. Java安全性是一个有趣的小事,必须要与之搏斗。
Add the site for your JavaWS application to the Java Security exceptions list. 将JavaWS应用程序的站点添加到Java安全性例外列表中。 You're saying you've done that, but have you also tagged your JNLP file to indicate what site it came from?
你说你已经这样做了,但你是否也标记了你的JNLP文件以指出它来自哪个网站?
At heart, the jnlp file is just an XML file and unless it says where it came from, java might be unable to determine whether it comes from a trusted site. 从本质上讲,jnlp文件只是一个XML文件,除非它说明它来自哪里,否则java可能无法确定它是否来自可信站点。
Do you have a tag in the JNLP similar to this? 你在JNLP中有一个类似的标签吗?
<jnlp href="someWebstartApp.jnlp" spec="1.0+" codebase="http://myserver.com/" xmlns:jfx="http://javafx.com">
Specifically, the bits for the href (name for the jnlp file on the codebase) and codebase (where the jnlp file and jars can be found). 具体来说,href(代码库中jnlp文件的名称)和代码库(可以找到jnlp文件和jar)的位。
Alternately, you might try invoking javaws directly from the command line: 或者,您可以尝试直接从命令行调用javaws:
javaws http:/myserver.com/someWebstartApp.jnlp
This would let Java grab the JNLP file itself, rather than the launch process from the browser which might fail to tell Java which URL the jnlp came from. 这将让Java抓取JNLP文件本身,而不是浏览器的启动过程,这可能无法告诉Java jnlp来自哪个URL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.