我不确定为什么每次使用html文件启动JNLP文件时都会下载该文件。请注意,在JNLP文件中调用的jar文件已签名。而我正在使用localhost apache服务器。
Launch.jnlp
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp
spec="1.0+"
codebase="http://127.0.0.1:1111/Test05"
href="launch.jnlp" >
<information>
<title>Test02</title>
<vendor>Len2x</vendor>
<homepage href="Test05/launch.html"/>
<description>Test02</description>
<description kind="short">Test02</description>
<icon href="CrsngSmXEAA8T3K.png" kind="default"/>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<update check="always" policy="always"/>
<resources>
<j2se version="1.8+"/>
<jar href="Test02.jar" main="true" version="1.0"/>
<property name="jnlp.versionEnabled"
value="true"/>
</resources>
<application-desc main-class="com.digitalpersona.onetouch.ui.swing.sample.UISupport.MainForm">
</application-desc>
</jnlp>
launch.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Test page for launching the application via JNLP</title>
</head>
<body>
<h3>Test page for launching the application via JNLP</h3>
<script src="http://java.com/js/deployJava.js"></script>
<script>
deployJava.createWebStartLaunchButton("launch.jnlp")
</script>
<!-- Or use the following link element to launch with the application -->
<!--
<a href="launch.jnlp">Launch the application</a>
-->
</body>
</html>