在最终解决了jar签名问题后(谢谢大家的帮助!),现在又出现了一个新问题.
尝试从launch.jnlp文件启动Web启动应用程序时,出现以下错误:
java.lang.NullPointerException
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
如果我使用指向我的计算机上的jar文件的jnlp文件,该应用程序运行正常,但如果我尝试在网站中使用jar文件 – 我得到上述错误.
究竟是什么问题?
jnlp文件格式正确,否则为什么它会在我的本地jar文件上运行?
这是jnlp:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp spec="1.0+">
<information>
<title>ExcelReader</title>
<vendor>Adam</vendor>
<homepage href="http://www.appquad.com"/>
<description>ExcelReader</description>
<description kind="short">ExcelReader</description>
<offline-allowed/>
</information>
<update check="background"/>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.7+"/>
<jar href="http://www.appquad.com/ExcelCopyApp/sExcelReader.jar" main="true"/>
<jar href="http://www.appquad.com/ExcelCopyApp/lib/jxl.jar"/>
</resources>
<application-desc main-class="excelreader.ExcelCopyApp">
</application-desc>
</jnlp>
最佳答案 确保您的JNLP文件格式正确:
http://download.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html