Java JaNeLA的JNLP错误

Java JaNeLA的JNLP错误,java,jakarta-ee,jnlp,java-web-start,Java,Jakarta Ee,Jnlp,Java Web Start,我从下载了jnlp文件,我从下载了JaNeLA 当我分析文件时,我发现了以下错误 这是文本报告 JaNeLA Report - version 11.05.17 Report for file:/C:/Documents%20and%20Settings/Administrator/Desktop/sample.jnlp Content type application/xml does not equal expected type of application/x-ja

我从下载了jnlp文件,我从下载了JaNeLA 当我分析文件时,我发现了以下错误

这是文本报告

JaNeLA Report - version 11.05.17


    Report for file:/C:/Documents%20and%20Settings/Administrator/Desktop/sample.jnlp

    Content type application/xml does not equal expected type of application/x-java-jnlp-file
    The element type "homepage" must be terminated by the matching end-tag "</homepage>".
JaNeLA报告-版本11.05.17
文件报告:/C:/Documents%20和%20设置/Administrator/Desktop/sample.jnlp
内容类型application/xml不等于预期类型的application/x-java-jnlp-file
元素类型“homepage”必须由匹配的结束标记“”终止。
我知道错误是直截了当的,但我无法解决它们,我相信我已经尽力了。有人能帮忙吗

这是我的JNLP文件

    <?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for SwingSet2 Demo Application -->
<jnlp   spec="6.0+"   codebase="http://my_company.com/jaws/apps"   href="swingset2.jnlp" >
  <information>
    <title>SwingSet2 Demo Application</title>
    <vendor>Sun Microsystems, Inc.</vendor>
    <homepage href="docs/help.html" />
    <description>SwingSet2 Demo Application</description>
    <description kind="short">A demo of the capabilities 
    of the Swing Graphical User Interface.</description>
    <icon href="images/swingset2.jpg"/>
    <icon kind="splash" href="images/splash.gif"/>
    <offline-allowed/> 
    <association mime-type="application-x/swingset2-file"  extensions="swingset2"/> 
    <shortcut online="false">
      <desktop/>
      <menu submenu="My Corporation Apps"/>
    </shortcut>
  </information>

  <information os="linux">   
    <title> SwingSet2 Demo on Linux </title>
    <homepage href="docs/linuxhelp.html">
  </information>

  <security>
      <all-permissions/>
  </security>
  <resources>
    <j2se version="1.6+" java-vm-args="-esa -Xnoclassgc"/>
    <jar href="lib/SwingSet2.jar"/>
  </resources>
  <application-desc main-class="SwingSet2"/>
</jnlp> 

SwingSet2演示应用程序
太阳微系统公司。
SwingSet2演示应用程序
这些功能的演示
Swing图形用户界面的。
Linux上的SwingSet2演示
我想知道如何解决第一个问题

JaNeLA建议:

应用程序的内容类型或MIME类型不是预期的类型

  • 如果此错误是从真实的实时服务器返回的,则会导致客户端浏览器在浏览器中将JNLP文件的内容简单地显示为XML!请与服务器管理员联系以添加内容类型
  • 从本地文件系统检查的JNLP文件类型通常不正确
该JNLP的来源是:

file:/C:/Documents%20and%20Settings/Administrator/Desktop/sample.jnlp
…所以你可以放心地忽略这个警告

其他问题 正如在评论中提到的那样

  <information os="linux">   
    <title> SwingSet2 Demo on Linux </title>
    <homepage href="docs/linuxhelp.html">
  </information>

另外,您没有关闭
主页
标签。试试这个:

<homepage href="docs/linuxhelp.html"/>

第一个问题可以忽略。这是因为jnlp是从文件系统检索的,而不是从web服务器检索的

报告说:

警告内容类型application/xml不等于预期类型的application/x-java-jnlp-file 应用程序的内容类型或MIME类型不是预期的类型


@安德鲁:相信我,先生,我是你的超级粉丝,这是你的文字报告。JaNeLA Report-version 11.05.17 Report for file:/C:/Documents%20和%20设置/Administrator/Desktop/sample.jnlp内容类型应用程序/xml不等于预期的应用程序类型/x-java-jnlp-file元素类型“homepage”必须由匹配的结束标记“”终止。@AndrewThompson和我想知道如何修复第一个错误“内容类型application/xml不等于预期类型的application/x-java-jnlp-file”
SwingSet2 Linux演示版
-应该以
/
@andrewhompson终止:非常感谢,我想知道如何解决第一个问题”内容类型application/xml不等于预期类型的application/x-java-jnlp-file“我理解这是一个警告,但我希望我的jnlp非常适合JaNelaThank,非常感谢您的友好和简单的解释
  <information os="linux">   
    <title> SwingSet2 Demo on Linux </title>
    <homepage href="docs/linuxhelp.html"/>
  </information>
<homepage href="docs/linuxhelp.html"/>
If this error is being returned from a real live server, it causes the client browser to simply display the content of the JNLP files as XML in the browser! Contact the server administraters to add the content-type.
It is typical for JNLP files checked from the local file system to be of incorrect type.