Skip to main content

Cmd line args from browser?

1 reply [Last post]
chasarific
Offline
Joined: 2009-02-24

Is it possible to pass "command line" arguments in from HTML(Java Script method call to javafx...) when JavaFX applets are run in a browser?

I'm using the standard way to load JavaFX applets from HTML as shown below:

javafx(
{
archive: "HelloApplet.jar",
draggable: true,
width: 150,
height: 100,
code: "hello.HelloApplet",
name: "Need Arguments!"
}
);

If it is NOT possible to do this from the HTML, is is possible to add "arguments" into the JNLP?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
chasarific
Offline
Joined: 2009-02-24

The "html":
javafx(
{
archive: "TestCommandArgs.jar",
draggable: true,
width: 200,
height: 200,
code: "testcommandargs.Main",
name: "TestCommandArgs"
} ,
{
workPlease: "Hello cmd line args"
}
);

the JavaFX code:
var arg:String = javafx.lang.FX.getArgument("workPlease") as String;