0
votes

I'm on Windows Server 2016 and try to run a Java Application via the Windows Task Scheduler. I can execute my Java Application in cmd.

"C:\Programm Files (x86)\Java\jre1.8.0_151\bin\java.exe" -jar C:\Wartung\Java\HealthCheckhl7.jar

This will execute the program and close the java.exe afterwards.

If I try to run this over the Task Scheduler, it doen'st close the java.exe afterwards.After a while, that leads to not enough Memory on the Server to handle its intended purpose.

I tried adding it to the Task Scheduler directly and via batch, it does not terminate the java.exe afterwards.

My Java Programm closes with System.exit(0); and it writes and reads files.

Has anybody a suggestion on what to do about this?

1
Could this maybe have to do with Input-/OutputStreams that haven't been closed correctly?emmics
I've checked my code again, everything is closed properly.Maya Reinert

1 Answers

-1
votes

try nohup java -jar xxx.jar&?