我正在使用JNLP在浏览器上加载Applet。我的applet在java版Java 1.7.0_25
下正常运行,但在使用Java 1.7.0_45
运行时遇到问题。我的错误堆栈跟踪如下
NLParseException[ Could not parse launch file. Error at line 6.]
at com.sun.javaws.jnl.XMLFormat.throwNewException(Unknown Source)
at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory._buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
at sun.plugin2.main.client.PluginMain.initManager(Unknown Source)
at sun.plugin2.main.client.PluginMain.access$200(Unknown Source)
at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Error while initializing manager: JNLParseException[ Could not parse launch file. Error at line 6.], bail out
我的jnlp文件是
<%@page contentType="application/x-java-jnlp-file" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="ds">
<information>
<title>D S Applet</title>
<vendor>ABC</vendor>
</information>
<security>
<all-permissions/>
</security>
<resources>
<!-- Application Resources -->
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="ds.jar" main="true"/>
</resources>
<applet-desc name="MyApplet" main-class="pkg.MyApplet" width="600" height="600">
<param name="separate_jvm" value="true"/>
<param name="urlToGetFilesFromServer" value="${urlToGetFilesFromServer}"/>
<param name="urlToSendFilesToServer" value="${urlToSendFilesToServer}"/>
<param name="recordIds" value="${recordIds}"/>
<param name="urlAfterSuccess" value="${urlAfterSuccess}"/>
<param name="jsonMapOfFilenameAndChecksum" value='${jsonMapOfFilenameAndChecksum}'/>
<param name="checksumOfJson" value='${checksumOfJson}'/>
<param name="pkcsConfigFilePath" value="${pkcsConfigFilePath}" />
</applet-desc>
<update check="background"/>
</jnlp>
我没有遇到问题 - 我的jnlp文件有问题或java版本有问题吗?
答案 0 :(得分:0)
问题出现在我的服务器端代码中,而不是JNLP文件中。