I am beginning to understand applets but i have a problem: i am testing it with xampp, and if i launch it with jnlp it does not work, grey box.
I have a jar packed made by eclipse, i set it in the same folder of index.html, as the jnlp file. I have tryed without jnlp with this code and it works:
this is the code of jnlp file:
<?xml version="1.0" encoding="UTF-8"?> My First Applet</information>
<resources>
<!-- Application Resources -->
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/ >
<jar href="MyApplet.jar" main="true" />
</resources>
<applet-desc
name="My Applet"
main-class="myApplet.MyApplet"
width="400"
height="200">
</applet-desc>
this is the code of index.html:
It works!
var attributes = {code:'myApplet.MyApplet.class', archive:'MyApplet.jar'}; var parameters = { fontSize:16, jnlp_href:'myApplet.jnlp' }; var version = '1.6' ; deployJava.runApplet(attributes, parameters, version); </script>
</body>
I have also another question: i would like to know how have I to do with eclipse to make a runnable jar putting music, pictures inside… I know it is a noob question, but I am very noob…