Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run Gradle Java Project in background

Tags:

java

linux

gradle

I have built a Java project using Gradle. It is working fine. I have to run this project on Linux and I want to do it without the terminal window.

If I close the terminal, the project terminates.

How can I run the program without the terminal window?

like image 332
mahesh chouhan Avatar asked Nov 01 '25 02:11

mahesh chouhan


2 Answers

You can use the nohup command:

nohup <your_command_line> >Output.log 2>&1 &
like image 146
Jens Avatar answered Nov 03 '25 15:11

Jens


I found answer to my question . My command is 'gradle runEngineWithMonitoring'.

I can now run this process in background, even after close of terminal in linux by following below steps.

Run

gradle runEngineWithMonitoring &

command. after this run

disown

command.

like image 21
mahesh chouhan Avatar answered Nov 03 '25 17:11

mahesh chouhan



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!