This content has been marked as final. Show 3 replies
If you have developed a Javafx script application, then take a look at this link:
If you have developed a Javafx2.0 application, then take a look at this link:
I am assuming this is about JavaFX 1.3 as 2.0 is still far from being release.
Have a look at Launch4j http://launch4j.sourceforge.net/ (there may be other similar product).
You may also want to pay attention to this article : Distributing a Java Web Start Application via CD-ROM http://today.java.net/pub/a/today/2008/07/10/distributing-web-start-via-cd-rom.html
Using this you can create a Swing or AWT based installer with an embedded JVM that takes care of setting up the JVM (if not already installed on the underlying system) and registering your JavaFX app to Java Web Start.
Note: you can also create a native, .NET, Flash, whatever installer that calls Java Web Start.
Please note that I've experienced a couple of issues doing that though:
- If you plan to distribute a self sufficient exec, packaging embedded JVMs + JRE installers (i.e.: for Linux & Windows) makes the size of the whole thing explode so it's better suited for CD-ROM distribution than web downloads.
You do not need to take care of that if you just want to distribute a bare-bone exec and ask your user to install the JVM themselves 1st.
- on 64bit Windows (probably Linux too) you need to install the 32bit JRE as JavaFX 1.3 only runs on 32bit JVM.
- there are bugs in Java Web Start. Somethings the registration process (that is invoking a process that does javaws -import <name of the JNLP>) stalls or fails and the dam app is not even able to return a proper error code (making it hard to detect).
- JRE installation is not able to return proper error code when canceled by the user or failing.
- You need a working Internet connection (to be able to download JavaFX 1.3 runtimes).
- JavaFX 1.3 runtimes caching causes issues: for some STUPID reasons, a pair of files described in http://dl.javafx.com/1.3/javafx-rt.jnlp are set to be downloaded lazily (see below) which means they are downloaded only when needed (in theory).
Unfortunately the whole dam JWS does not really work that great so the files javafx-rt-lazy-windows-i586__V1.3.1_b101.jar & javafx-rt-fonts-windows-i586__V1.3.1_b101.jar are not downloaded at all (at least on our network) which makes the whole program crash with ClassNotFoundException when trying to use classes such as javafx.fxd.FXDNode or things that rely on LazyFont (a class in the private API) while other part of the program may work Ok (basic scene graph node handling for example).
One way to circumvent the issue would be to make your installer try to cache the whole runtimes by calling:
<jar href="http://dl.javafx.com/1.3/progressbar__V1.3.1_b101.jar" download="progress" main="false"/> <jar href="http://dl.javafx.com/1.3/javafx-rt-windows-i586__V1.3.1_b101.jar" part="javafx-rt" download="eager" main="false"/> <jar href="http://dl.javafx.com/1.3/javafx-rt-lazy-windows-i586__V1.3.1_b101.jar" part="javafx-rt" download="lazy" main="false"/> <jar href="http://dl.javafx.com/1.3/javafx-rt-fonts-windows-i586__V1.3.1_b101.jar" part="javafx-rt" download="lazy" main="false"/>
Unfortunately I've found out it's not working Ok all the time.
javaws -import http://dl.javafx.com/1.3/javafx-rt.jnlp
You'd better have a look at the Oracle Java Web Start forum (Java Web Start & JNLP too and get a hand on Andrew Thompson's JaNeLA program as it will help you validate the XML structure of your JNLP(s).
A lot of base JWS issues are related to bad structure of JNLP coupled with bad Sun/Oracle JNLP documentation (actually the JNLP references contains much much more correct and useful info than the Programmer's guide).
And for info NetBeans does produce bad or insufficient JNLPs.
Even after that other outstanding issues with Java Web Start persist such as :
- program icon looks like crap on Windows Vista & 7
- program shortcut may not be created at initial installation
- program shortcut disappear or stop working for unknown reasons
- program fails to update itself
- program pauses for a long time before actually starting (seems related to a network timeout).
Hello, You can easily execute the jar files via JNLP.
You must first have good knowledge of deploying Jar files. You can not only execute jar files but also you can create Desktop Shotcut, StartMenu Programs via JNLP.