Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running a Java Swing Application by double click (w/o console)

Suppose I have an executable JAR that launches a Swing GUI. If it is launched from the console (e.g. java -jar myapp) then the console is also used by the application (i.e. logs are being printed). This logging takes a bit time, it's quite verbose.

Note, that I only have a JAR, not the sources.

Question: what happens when you double-click run a JAR? Obviously no logs are visible, but are they simply invisible, or does this indeed boost the performance of the application (by skipping logging)?

like image 417
emesx Avatar asked Dec 26 '22 12:12

emesx


1 Answers

If you don't want to see the console, use javaw to launch the program instead of java. So you would run: javaw -jar myapp.jar

like image 196
John Farrelly Avatar answered Dec 30 '22 10:12

John Farrelly