Kasper,

It should work as is.  I regularly use Nashorn for shell scripting headlessly.

- Check to make sure you are using the latest JDK 8. There was a bug in 
ScriptManager that was fixed many releases ago.  
http://jdk8.java.net/download.html
- Check to see if some other command line option is triggering the GUI.
- If you are using 'jjs', don't specify -fx.
- If you use an old version of JSObject, the Applet argument on getWindow will 
force a GUI.
- Check for other AWT / JavaFX references in your code.
- Check to see if you have other script engines installed that might trigger a 
GUI.

Cheers,

-- Jim



On 2013-08-07, at 3:08 AM, Kasper Nielsen <[email protected]> wrote:

> Hi,
> 
> I'm developing a small library that utilizes Nashorn.
> And I was wondering how I can get a headless NashornScriptEngine without
> requiring users
> to set java.awt.headless = true?
> The dialog box that pops up every time is really annoying.
> 
> Cheers
>  Kasper

Reply via email to