Reputation: 14707
I have downloaded a jnlp file from Here and I have downloaded the JaNeLA from Here When I analyze the file I have got following errors.
This is the 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 the error are straight forwards but I am not able to resolve them and believe my I have 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>
Upvotes: 4
Views: 2219
Reputation: 2002
The first problem can be ignored. It is because the jnlp was retrieved from the file system, rather than a web server.
The JaNeLA help page says this:
Warning Content type application/xml does not equal expected type of application/x-java-jnlp-file The content-type or MIME type of the application was not the expected type.
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.
Upvotes: 0
Reputation: 168825
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 suggests:
The content-type or MIME type of the application was not the expected type.
- 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.
The source of that JNLP is:
file:/C:/Documents%20and%20Settings/Administrator/Desktop/sample.jnlp
..so you can safely ignore that warning.
As mentioned n a comment.
<information os="linux">
<title> SwingSet2 Demo on Linux </title>
<homepage href="docs/linuxhelp.html">
</information>
That homepage
element should be terminated with a /
, like this:
<information os="linux">
<title> SwingSet2 Demo on Linux </title>
<homepage href="docs/linuxhelp.html"/>
</information>
Upvotes: 2
Reputation: 236004
Also, you didn't close the homepage
tag. Try this:
<homepage href="docs/linuxhelp.html"/>
Upvotes: 2