This content has been marked as final. Show 6 replies
I haven't looked at this since jfx came along so perhaps they've added something but in classic jnlp this is not really supported (afaik).1 person found this helpful
With desktop install the jnlp is copied and cached on the local system so next time it runs it uses that local cache, which means the 'params' are the ones that were generated on first launch.
This is pretty annoying since hyperlinking to application content is ubiquitous these days for web apps and there's an expectation from users that desktops should do the same.
Possibly an option is to do it via the embedded mode and just Popup a new stage (if you want it in its own window). I haven't tried that, so not sure what happens if you kill the browser it was launched from.
A hack I did years ago was to have my servlet (that generates the jnlp) store the URL parameters for the calling ip address and then when the app started it called onto the servlet to get those parameters for it's ip. A horrible cludge but it got me through at the time.
Thank you! Your answer just confirms that there's no simple way to make the Webstart-version work. Since the servlet hack sounds to difficult to me and I just need a full-screen version, I am now trying to start the standalone via php. Just my php does not yet recognize java (exec('java -version') gives no result. So, I have a long night before me :-).
1 person found this helpful
perhaps they have added somethingExactly. They have added the DeployJava Toolkit the OP is using. None of your comments therefore apply.
@OP: it should work. make sure your JNLP file either contains a valid href attribute or none. Try the JWS forum.
Waaahh. But thank you! So I will start trying again. Would anyone have a look at my code? The jnlp-file is generated by NetBeans Dev:
in the html file, I have the script
<?xml version="1.0" encoding="utf-8"?> <jnlp spec="1.0" xmlns:jfx="http://javafx.com" href="PillBox.jnlp"> <information> <title>PillBox</title> <vendor>Carola</vendor> <description>Sample JavaFX 2.0 application.</description> <offline-allowed/> </information> <resources os="Windows"> <jfx:javafx-runtime version="2.0+" 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="PillBox.jar" size="1965165" download="eager" /> <jar href="lib/mysql-connector-java-5.1.13-bin.jar" size="753542" download="eager" /> </resources> <applet-desc width="800" height="600" main-class="com.javafx.main.NoJavaFXFallback" name="PillBox" /> <jfx:javafx-desc width="800" height="600" main-class="pillbox.PillBox" name="PillBox" > <fx:param name="p4" value="true"/> <fx:param name="p3" value="4"/> <fx:param name="p2" value="500"/> <fx:param name="p5" value="true"/> <fx:param name="p1" value="500"/> </jfx:javafx-desc> <update check="background"/> </jnlp>
and the call
I tried several variations. " instead of ' and deleting '. Deleting the parameter tags in the jnlp-file. I have no idea what to try next.
<td align="center" valign="middle"><input style="height: 80px; width: 250px" type="button" value="Simulation mit Webstart starten" onClick="return launchApplication('PillBox.jnlp');"></td>
Edited by: 908057 on 14.01.2012 17:48
Define 'doesn't work'.
The java-application starts with the parameters defined in the jnlp-file, not with the parameters defined in the script.
If I delete the parameters from the jnlp-file, the java-applications starts with saying that there are no parameters:
JOptionPane.showMessageDialog(null, "getParameters().getRaw().size() : "+getParameters().getRaw().size() , "", JOptionPane.OK_CANCEL_OPTION);