JavaFX – Passing Arguments
June 11, 2009
7 comments
I received a query on how to pass arguments in JavaFX. It basically depends on how we deploy the application. The application can be deployed using JavaWebStart, as an applet or launched from command line.
Lets take a simple application..
|
The argument is passed as key-value pair. The value is retrieved using FX.getArgument( <key> ) method. Arguments can be passed to various deployment modes as shown below.
Command Line:
javafx -cp FXArguments.jar fxarguments.Main key="From Command Line"
Applet:
|
Java Web Start:
|
Source:
var dzone_url = “http://blogs.sun.com/rakeshmenonp/entry/javafx_passing_arguments”;
var dzone_style = ’2′;
digg_skin = ‘compact’;
digg_window = ‘new’;
Categories: javafx
arguments, deployment