Jnlp 无法解析启动文件.第 0 行错误 [英] Jnlp Could not parse launch file. Error at line 0
本文介绍了Jnlp 无法解析启动文件.第 0 行错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在网上搜索并没有找到明确的解决方案,所以这里是:
I have searched the web and have found no definitive solution, so here goes:
我制作了一个 JNLP 文件以在同一文件夹中启动 JAR,但是它无法启动并给出错误无法解析启动文件.第 0 行错误."
I made a JNLP file to launch a JAR in the same folder, however it fails to launch and gives the error "Could not parse launch file. Error at line 0."
这里是 DevChat.jnlp:
Here's DevChat.jnlp:
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP to Launch DevChat -->
<jnlp
spec="1.0+"
href="DevChat.jnlp">
<information>
<title>DevChat</title>
<vendor>Dev Team</vendor>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se version="1.4.2"/>
<jar href="DevSuite.jar" main="true" />
<jar href="commons-net-3.0.1.jar" />
</resources>
<application-desc
main-class="DevChat"
name="DevChat"
</application-desc>
</jnlp>
还有例外:
JNLParseException[ Could not parse launch file. Error at line 0.]
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.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
和包装的异常:
java.lang.NullPointerException
at com.sun.deploy.xml.XMLParser.parseXMLAttribute(Unknown Source)
at com.sun.deploy.xml.XMLParser.parseXMLElement(Unknown Source)
at com.sun.deploy.xml.XMLParser.parseXMLElement(Unknown Source)
at com.sun.deploy.xml.XMLParser.parseXMLElement(Unknown Source)
at com.sun.deploy.xml.XMLParser.parseXMLElement(Unknown Source)
at com.sun.deploy.xml.XMLParser.parseXMLElement(Unknown Source)
at com.sun.deploy.xml.XMLParser.parse(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.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
从控制台运行什么都不显示.任何帮助将不胜感激!
Running from console shows nothing at all. Any help would be appreciated!
推荐答案
我猜这个 XML 格式不正确:
I guess that this XML is malformed:
<application-desc
main-class="DevChat"
name="DevChat"
</application-desc>
你需要像这样关闭打开的标签:
you need to close the open tag like this:
<application-desc
main-class="DevChat"
name="DevChat">
</application-desc>
这篇关于Jnlp 无法解析启动文件.第 0 行错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文