I need to run Sh file from java class.In that java main class is from main class it calls another sh file it takes data from db writes to csv file.It should run continuously.in back ground how to make this run.I made thread as setDaemon.But I am not sure that is it running Back end or not?? When i am running manually that sh file is creating but when i am running backend i did’t get any log file or logs.
Share
The “&” works in this case like “|” etc.:
Runtime.getRuntime().exec(“./test.sh &”);
(I made a test on Debian with and endless loop in a shell script and the java got back the control after starting the script)