Create and Deploy a JavaFX WebStart Application

I realized when I updated my FlashCard JFX game that I could not remember what I actually had to do in order to create a deployable Java WebStart application. So that I always had a simple reference to refer to, I’m posting it here. Hopefully this will help someone else.

Basically, a JavaFX application is typically deployed through Java Web Start, so I think most of these instructions will apply to any Java Web Start application. Steps 1 through9 are from the help in NetBeans itself. The part about signing the jars is from Kirill Grouchnikov’s blog.

1. Use NetBeans - there are other ways, but this is a requirement to follow my way.

2. Install the JavaFX plugin.

3. After running your project locally and making sure it works and all the dependencies are there, right click on the project and choose “Properties” from the menu.

4. Choose Categories: Application -> WebStart.

5. Check “Enable WebStart”.

6. Fill in the codebase to the directory where you will copy up the dist folder to on your web server. For me it is “/downloads/flashcardjfx/dist”

7. Choose “Run” from the Properties list.

8. Name the configuration and check “Run with Java Web Start”.

9. Clean and build your project.

10. Cd to the dist directory of your Java FX project.

11. Run keytool using something similar to this:

keytool -genkey -keystore javahair.keys -alias / -validity 365

12. Sign your main jar by running something similar to this:

jarsigner -keystore javahair.keys -storepass ***** FlashcardJFX.jar /

13. Cd to the lib directory in your dist and sign all the jars there like so:

jarsigner -keystore ..\javahair.keys -storepass ***** javafxrt.jar /

14. FTP all the contents of your dist directory to your webserver to the codebase directory you specified in step 6.

Now link to the launch.jnlp file in that directory and you should be good to go.

The older articles in this how-to can be found here:

Learning JavaFX

JavaFX Example - FlashCard Game

JavaFX FlashCard Source Code and Web Start Link

Adding Sound to the FlashCard JavaFX Game

Share/Save/Bookmark

Related posts:

  1. Adding Sound to the FlashCard JavaFX Game I finally had a small amount of time to look...
  2. JavaFX FlashCard Source Code and Web Start Link This is the post I promised that contains a link...
  3. JavaFX Example - FlashCard Game Note: An updated version of the source code for JavaFX...
  4. How To Create An Editable List Page in ADF 11g For those of you wondering how my presentation turned out...
  5. JavaFX Flashcard Example Updated for 1.1 I have updated the sourcecode for my JavaFX flashcard game...

Leave a reply

You must be logged in to post a comment.