I want my Java program to run in the background. How would you do that? Thank!
This should not be decided by the Java program, but by the operating system and the end user. The end user only needs to configure the operating system so that it runs at startup or as a scheduled task.
You just need to make sure that your program does not spawn any user interface.
Tanukisoftware Java Service Wrapper . Windows Java, , ..
"Community Edition" , , .
Linux, , java . -
nohup java your_app &
...
, googling , start/b . , - :
start/b java your_app
Swing GUI setVisible (false)?
What is your definition of "running in the background"? By default, a Java application does not have a console. Therefore, if you do not create the main window, it will not have a visible interface. I would think that this would work as a background job.
to run .java in the background
java FileName &
to run .jar in the background
java -jar FileName.jar &
Please use & at the end to run in the background
Source: https://habr.com/ru/post/1741963/More articles:Manually merging a list in C # with duplicates - listOracle Intermediate Size - performancehow to create a one-dimensional dynamic array in c #? - arraysУзнайте, сколько хранения занимает строка в базе данных - sql-server-2008Extract external query string / javascript binding value: file.js # foo = bar - javascriptflexible support for REST methods - flexJava static and streaming security or what to do - javaIs Rails 3 a "_method = PUT" that should still work? - flexSecrets of delivering large sizes to large sizes? - .netFlash Player 9 против Flash Player 10 с FLEX 3,? _method = PUT/DELETE не работает? - restAll Articles