我正在使用一个简单的JNLP的java webstart应用程序。 最近我在启动它时遇到了一些奇怪的问题。我之前从未遇到过这个问题,我很确定没有任何内容被修改:( 尝试启动此应用时出现此错误。
WARNING: <> tag is not closed correctly Exception parsing xml at line 33
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.LaunchDownload.downloadExtensionsHelper(Unknown Source)
at com.sun.javaws.LaunchDownload.downloadExtensions(Unknown Source)
at com.sun.javaws.Launcher.prepareLaunchFile(Unknown Source)
at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(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)
正如你所看到的,它没有给出哪个标签有问题。据我所见;第33行没有问题。
它有一个简单的标记<argument>session_token_here</argument>
更新: 这是JNLP文件;
<jnlp spec="1.0+" codebase="https://MASKHOST:5467/"
href="https://MASKHOST:5467/myjnlp.jnlp?session=rO0ABXNyADpjb20ud2lseS5pbnRyb3Njb3BlLnNwZWMuc2VydmVyLmJlYW5zLnNlc3Npb24uU2Vzc2lvblRva2Vu9ef0qNvv5yoMAAB4cHNyADBjb20ud2lseS5pc2VuZ2FyZC5wb3N0b2ZmaWNlLlBvc3RPZmZpY2VTcGVjaWZpZXL69Qzv1IsXcgwAAHhwdw4ABUxvY2FsAAVMb2NhbHh3CDWNLwuY3RbfeA%3d%3d&myauth=true">
<information>
<title>App Title</title>
<vendor>Company</vendor>
<homepage href="null"/>
<description>Product Name</description>
<icon href="https://MASKHOST:5467/images/logo.png"
kind="default"/> </information> <security>
<all-permissions/> </security> <update check="timeout"
policy="always"/> <resources>
<jar
href="https://MASKHOST:5467/product/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar"
download="eager" main="false"/>
<extension href="https://MASKHOST:5467/jnlp/productplugins.jsp"
name="Component name"/>
<extension href="https://MASKHOST:5467/jnlp/platformplugins.jsp"
name="Core Plugins"/>
<property name="osgi.instance.area" value="@user.home/Application
Data/company/product/component"/>
<property name="osgi.configuration.area"
value="@user.home/Application Data/company/product/component"/>
<property name="eclipse.product" value="osgiproductname"/>
<java java-vm-args="-Xms64m -Xmx256m -Dsun.java2d.noddraw=true"
href="http://java.sun.com/products/autodl/j2se"
version="1.6*&1.6.0_05+"/>
<property name="sun.java2d.noddraw" value="true"/> </resources>
<application-desc
main-class="org.eclipse.equinox.launcher.WebStartMain">
<argument>-noexit</argument>
<argument>-clean</argument>
<argument>-loginhost</argument>
<argument>MASKHOST</argument>
<argument>-loginport</argument>
<argument>6785</argument>
<argument>-session</argument>
<argument>rO0ABXNyADpjb20ud2lseS5pbnRyb3Njb3BlLnNwZWMuc2VydmVyLmJlYW5zLnNlc3Npb24uU2Vzc2lvblRva2Vu9ef0qNvv5yoMAAB4cHNyADBjb20ud2lseS5pc2VuZ2FyZC5wb3N0b2ZmaWNlLlBvc3RPZmZpY2VTcGVjaWZpZXL69Qzv1IsXcgwAAHhwdw4ABUxvY2FsAAVMb2NhbHh3CDWNLwuY3RbfeA==</argument>
<argument>-myauth</argument>
<argument>true</argument>
</application-desc>
</jnlp>
非常感谢任何进一步处理的帮助或指示。
答案 0 :(得分:3)
这一行:
<java java-vm-args="-Xms64m -Xmx256m -Dsun.java2d.noddraw=true" href="http://java.sun.com/products/autodl/j2se" version="1.6*&1.6.0_05+"/>
有一个嵌入式&
,应该像这样转义:
<java java-vm-args="-Xms64m -Xmx256m -Dsun.java2d.noddraw=true" href="http://java.sun.com/products/autodl/j2se" version="1.6*&1.6.0_05+"/>
第一行还有未转义的&
。
以下行缺少结束双引号:
<extension href="https://MASKHOST:5467/jnlp/productplugins.jsp" name="Component name/>
但这可能是一个新的错误。
答案 1 :(得分:3)
<extension href="https://MASKHOST:5467/jnlp/productplugins.jsp"
name="Component name/>
应该是..
<extension href="https://MASKHOST:5467/jnlp/productplugins.jsp"
name="Component name"/>
但是使用JaNeLLA检查JNLP并修复发现的任何错误。
答案 2 :(得分:2)
如果没有任何JNLP文件,我建议使用Janela JNLP验证工具
答案 3 :(得分:1)
也许你有一个xml-comment或挂引号字符"
或什么?