Invoke java silently, Mac Os X

console, java, macos, operating-system

Solution

According to oracle's doc, the following should work:

java -Djava.awt.headless=true

Problem

I have a huge generated shell script with a lot of lines like ``` java -jar <app_jar> <params> ``` Every invocation brings a java icon to the dock, making active application to loose the focus every line where java app is invoked Is there a way to run it silently? Java application is a single class, simple console app with a file IO routines, no windows created whatsoever

Original source