Testing the JNLP File
In my last blog I attempted to reverse engineer the notepad example and ended up with the following text:
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for ActiveMath -->
<jnlp spec="1.0+"
codebase="http://202.65.70.207/myweb/"
href="AMJ002.jnlp">
<information>
<title>Active Math Java Test</title>
<vendor>Softway Interactive Education</vendor>
<description>Active Math Java Test</description>
<homepage href="http://202.65.70.207/myweb/index.htm"/>
<description kind="short">ClickMeApp uses 1 custom class plus 1
standard one</description>
<offline-allowed/>>
</information>
<resources>
<jar href="ActiveMathJA002.jar"/>
<j2se version="1.6+"
href="http://java.sun.com/products/autodl/j2se"/>
</resources>
<application-desc main-class="AMJFormA002"/>
</jnlp>
which I saved as AMJ002.jnlp.
Before testing this home made code I cut and pasted the whole notepad example, saved it as notepad.jnlp in my web folder, and downnloaded the notepad.jar file into the same folder. I then copied the following from the tutorial:
If you click this link to the Notepad.jnlp
file, you open and run the Notepad application from the sun server.
and pasted it into my web page. It obviously worked because it points to the original jnlp file on the original server. I then modified the pasted link as follows.
If you click this link, you open and run the Notepad application from my server.
To my amazement, the link worked, and Notepad opened, when I clicked on the link. (NB mine is a private server and it may not be turned on if and when YOU click on the link).
Then came the real test. Posting a link to my cobbled together file to run my app. Everything seemed to be fine until the moment when the app should have opened, and I got an error message saying: Unable to launch the application Active Math Java Test published by Softway Interactive Education from the server 202.65.70.207.
Disappointing ...
Comments