首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >JaNeLA的JNLP错误

JaNeLA的JNLP错误
EN

Stack Overflow用户
提问于 2012-11-21 07:29:27
回答 3查看 2.1K关注 0票数 4

我已经从Here下载了一个jnlp文件,并且在分析我得到的以下错误文件时,我已经从Here下载了JaNeLA。

这是文本报告

代码语言:javascript
复制
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>".

我知道错误是直截了当的,但我无法解决它们,并相信我已经尽了最大的努力。有人能帮上忙吗?

这是我的JNLP文件。

代码语言:javascript
复制
    <?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> 
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-11-21 08:10:05

我想知道如何解决第一个问题

代码语言:javascript
复制
Content type application/xml does not equal expected type of application/x-java-jnlp-file

JaNeLA help建议:

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

JNLP

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

该JNLP的源代码是:

代码语言:javascript
复制
file:/C:/Documents%20and%20Settings/Administrator/Desktop/sample.jnlp

..so您可以放心地忽略该警告。

其他问题

正如在评论中提到的那样。

代码语言:javascript
复制
  <information os="linux">   
    <title> SwingSet2 Demo on Linux </title>
    <homepage href="docs/linuxhelp.html">
  </information>

表示 homepage元素应以/结尾,如下所示:

代码语言:javascript
复制
  <information os="linux">   
    <title> SwingSet2 Demo on Linux </title>
    <homepage href="docs/linuxhelp.html"/>
  </information>
票数 2
EN

Stack Overflow用户

发布于 2012-11-21 08:12:17

而且,您没有关闭homepage标记。试试这个:

代码语言:javascript
复制
<homepage href="docs/linuxhelp.html"/>
票数 2
EN

Stack Overflow用户

发布于 2013-11-24 01:14:31

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

JaNeLA help page这样说:

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

代码语言:javascript
复制
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. 
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13484009

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档