Yesterday I tried to write my first JavaFX... I Found it quite easy.... It's name was "VideoPlayer".

But when I tried to put it on a web page and deploy it as an java Applet it became a Nightmare !

First I tried to use the code Netbeans give me in my 'dist' folder... It worked well on my computer but not when I putted it on my web site...

I notice then that it was trying to load the JNLP from this host: "http://localhost:8093/servlet/org.netbeans.modules.javafx.project.JnlpDownloadServlet/"... It was the problem !

So I change my "VideoPlayer_browser.jnlp" and change the host by the one of my webSite : "". It then look like this :

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="" href="VideoPlayer_browser.jnlp">
        <vendor>Jonathan ANTOINE</vendor>
        <homepage href=""/>
        <j2se version="1.5+"/>
        <extension name="JavaFX Runtime" href=""/>
        <jar href="VideoPlayer.jar" main="true"/>
    <applet-desc name="VideoPlayer" main-class="com.sun.javafx.runtime.adapter.Applet" width="384" height="288">
        <param name="MainJavaFXScript" value="videoplayer.Main">

It then worked well !

I also give you what to put in your HTML page :

              archive: "VideoPlayer.jar",
              draggable: true,
              width: 384,
              height: 306,
              code: "fr.antoinej.videoplayer.Main",
              name: "VideoPlayer"
	      isApplet: true

I some params (isApplet: true) to tell my apps that it is an applet....

An other interesting thing you can add on you HTML page is to add thie next snippet in the header part. It will reload you JNLP files and do not use the cache each time you will load the page... Better when adding frequently features to you application...


Update (21/12/2008): You can now find a tutorials on the JavaFx webSite : here !