Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Invoke java silently, Mac Os X

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

like image 716
Vetal Avatar asked Oct 21 '25 21:10

Vetal


1 Answers

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

java -Djava.awt.headless=true
like image 84
Vincent Fourmond Avatar answered Oct 23 '25 10:10

Vincent Fourmond



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!