How to deploy JavaFX application writen in JavaScript unsing Nashorn

Danno Ferrin danno.ferrin at
Wed May 7 15:10:45 UTC 2014

The JJS command line tool delegates to, with a lot of custom command line switches.  Some of these command line switches also do custom things, particularly the -fx flag.  The problem with using the Shell class as the main for javapackager its that currently we don’t support command line arguments not passed in by the user.  So your best bet is to write a main class that passes in {“apps_all.js", “-fx-“, “.”} to the static main method of Shell, note all the custom command line arguments the shell script passes in, and hanse the packager set those as jvmArgs.

On May 7, 2014, at 5:26 AM, Mike Hearn <mike at> wrote:

> It's probably easiest to have a tiny Java app that just loads the JS files
> from resources in the JAR and runs it via Nashorn directly. Then all
> existing tools like jfxpackager, JWrapper etc can treat it like a Java app.
> On Wed, May 7, 2014 at 3:30 AM, Bilal Soidik <bilalsoidik at> wrote:
>> Hi!
>> As you know, we can write JavaFX application in JavaScript using Nashorn
>> Engine, but I have to run application with command line like: > jjs
>> app_all.js -fx .
>> So I wont know how can I deploy application that let me click on and lunch
>> it or make a self-contained application packaging using JDK 7(Update 6 or
>> later) packaging tools
>> --
>> *Bilal Soidiki Mpapandza*
>> *Etudiant en Master Spé. Qualité du Logiciel, FS UIT*
>> *Ingénieur logiciel et Développeur Java, C/C++,.NET et PHP*
>> *Tél.            *:*(+212) 602746546*
>> *Blog           *:*
>> <>  *
>> *Twitter       *:* bilaalsoidik*
>> *Skype       *:* bilalsoidik*

More information about the openjfx-dev mailing list