So I'm attempting to get an applet to run on a web host using the new(ish) Java Network Launch Protocol thingy, and I have been less than successful.
NOTE: The below information has been modified in the following ways for security reasons:
1. "[host]" indicates the index url for my website
2. "[main]" indicates the main class (using . instead of /)
I am currently getting an exception that reads: "JAR manifest codebase mismatch for http://[host]/testApp/runner.jar"
So, here is where I currently stand with my code:
HTML Page:
<script src="http://www.java.com/js/deployJava.js"></script> <script> var attributes = { code:'[main]', width:1200, height:675} ; var parameters = {jnlp_href: 'JNLP_Page.jnlp'} ; deployJava.runApplet(attributes, parameters, '1.6'); </script>
JNLP Page:
<?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" codebase="http://[host]" href="JNLP_Page.jnlp"> <information> <title></title> <vendor></vendor> </information> <resources> <!-- Application Resources --> <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" /> <jar href="runner.jar" main="true" /> </resources> <applet-desc name="" main-class="[main]" width="1200" height="675"> </applet-desc> <update check="background"/> </jnlp>
Jar Manifest:
Manifest-Version: 1.0 Created-By: 1.6.0_14 (Sun Microsystems Inc.) Main-Class: [main] Codebase: [host]
Does anyone have any ideas? I'm completely new to JNLP and the new security measures put in place in the recent java update.
--- Update ---
The main-class field in the manifest is using / instead of . btw (I can't seem to load the edit post button to change it)