Friday Jan 16, 2009

Webstarting your JavaFX application

Here is another tip on how to deploy your JavaFX application using the Java Web Start technology. Of course if you are using a tool such as NetBeans, the whole process is very simple. You would just change you project properties to use "Web Start Execution" and you are done (the IDE will generate the appropriate JNLP file and a browser specific JNLP which includes the applet-desc tag).

If you have to handcode the JNLP file for your application, edit the xml code below, as needed and save with a file with a .jnlp extension. Once you've done this you are ready to deploy the resource and your customer will be able to invoke the JavaFX application by the URL (http://<someplace on the web>/<application_name>.jnlp)

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="file:/<URL_to_jnlp_file>/" href="<application_name>.jnlp">
    <information>
        <title>App Name</title>
        <vendor>blah</vendor>
        <homepage href=""/>
        <description>blah blah</description>
        <offline-allowed/>
        <shortcut>
            <desktop/>
        </shortcut>
    </information>
    <resources>
        <j2se version="1.5+"/>
        <extension name="JavaFX Runtime" href="http://dl.javafx.com/javafx-rt.jnlp"/>
        <jar href="<Application_name>.jar" main="true"/>
    </resources>
    <application-desc main-class="<package_name_for_your_app>.Main"/>
</jnlp>

About

octav

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today