I am trying to deploy JavaFX 2 app using Java Web start (generated by NetBeans) and I need to pass some args to my app using JavaScript.
First question: Is it even possible? Second question: If it is possible, how can I do it. :-)
My JNLP file is:
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="MD.jnlp">
<information>
<title>MD</title>
<offline-allowed/>
</information>
<resources>
<jfx:javafx-runtime version="2.2+" href="http://javadl.sun.com/webapps/download/GetFile/javafx-latest/windows-i586/javafx2.jnlp"/>
</resources>
<resources>
<j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
<jar href="MD.jar" size="675286" download="eager" />
<jar href="lib/log4j-1.2.17.jar" size="519899" download="eager" />
</resources>
<security>
<all-permissions/>
</security>
<applet-desc width="800" height="600" main-class="com.javafx.main.NoJavaFXFallback" name="MD" >
<param name="requiredFXVersion" value="2.2+"/>
</applet-desc>
<jfx:javafx-desc width="800" height="600" main-class="com.blabla.MD" name="MD" >
<fx:param name="jmeno" value="hodnota"/>
</jfx:javafx-desc>
<update check="always"/>
</jnlp>
And my web page has this code:
<SCRIPT src="./web-files/dtjava.js"></SCRIPT>
<script>
function launchApplication(jnlpfile) {
dtjava.launch( {
url : 'MD.jnlp',
},
{
javafx : '2.2+'
},
{}
);
return false;
}
</script>
Thx. :-)