简体   繁体   English

如何强制Java Web Start运行自签名JNLP?

[英]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文件时,我收到此警告: Java应用程序被阻止

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.

相关问题 Java 7u51不接受带有自签名证书的JNLP吗? - Java 7u51 will not accept JNLP with self-signed certificate? 我可以在Java中创建自签名证书吗?这些证书将被Web浏览器自动信任? - Can I create self-signed certificate in Java which will be automatically trusted by web browsers? 如何在Java Web Start(JNLP)下调试应用程序? - How can I debug applications under Java Web Start (JNLP)? 无法运行 Java Web Start JNLP - Cannot run Java Web Start JNLP Java 8的自签名证书 - Self-Signed Certificates With Java 8 如何使用自签名证书在我签名的jar文件中设置发布者名称? - How can I set the publisher name in my signed jar file, using a self-signed certificate? 如何使用自签名证书运行Java HTTP服务器并信任浏览器? - How to run a Java HTTP server with self-signed certificate and trust that for browers? 通过https的Java Web服务 - 如何将自签名证书添加到客户端API? - Java web service over https - How to add a self-signed certificate into a client api? JVM 可以只信任一次运行的自签名证书吗? - Can JVM trust a self-signed certificate for only a single run? 如何在不使用JNLP文件的情况下从Web服务器启动Java应用程序? - How can I start a Java application from a web server without using a JNLP file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM