JNLP error with JaNeLA

I downloaded the jnlp file from Here and I downloaded JaNeLA from Here When I parse the file, I get the following errors.

This is a text report.

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>". 

I know that the error goes straight ahead, but I can’t solve them and I think that I tried my best. Can anyone help?

Here is my JNLP file.

  <?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> 
+4
source share
3 answers

I am interested to know how to fix the first problem.

 Content type application/xml does not equal expected type of application/x-java-jnlp-file 

The JaNeLA help offers:

The content type or application MIME type was not expected.

  • If this error is returned from a real live server, it causes the client browser to simply display the contents of the JNLP files in XML format in the browser! Contact your server administrators to add a content type.
  • For JNLP files selected from the local file system is incorrect.

The source of this JNLP is:

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

.. so you can safely ignore this warning.

Another problem

As mentioned n comment.

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

This homepage element should be completed with / , for example:

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

In addition, you did not close the homepage tag. Try the following:

 <homepage href="docs/linuxhelp.html"/> 
+2
source

The first problem can be ignored. This is because jnlp was extracted from the file system, not from the web server.

JaNeLA's help page says the following:

Warning The content type type / xml does not match the expected application type / x -java-jnlp-file The content type or application MIME type was not expected.

 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
source

Source: https://habr.com/ru/post/1447371/


All Articles