Java Reference
In-Depth Information
The preferred option is to facilitate the download and seamless installation and execution of
your application through Java Web Start, a deployment and execution container built on the
Java platform. In this recipe, we will use the JavaFX packager tool to build and package our
application to be distributed using Java Web Start.
Getting ready
This recipe will use the javafxpackager tool to build and package the sample application. If
you are not familiar with javafxpackager, review the previous recipe. If you prefer to use an
IDE for your build and deployment, that is OK. You can still follow along, as both NetBeans
and Eclipse support all the topics covered here.
We will package a sample application named "webstart-demo". We will use the
javafxpackager tool to build the application and generate the Web Start assets,
which we will place on a web server. This will allow us to web-launch and automatically
install our application using Web Start.
How to do it...
We will go through several steps to demonstrate how to build and deploy your application with
Web Start:
1. The first step is to create a small sample application. You can find the full code at
ch07/source-code/src/webstart/WebStartDemo.fx :
package webstart.demo;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
var msg:Text = Text {
font : Font {
size : 72
embolden: true
name: "sans-serif,Arial,Helvetica"
content: "I was Web Started!"
msg.translateY = msg.boundsInLocal.height;
Stage {
Search WWH ::

Custom Search