Suspend child process created by java

I have a java program that uses Runtime.exec()

to create a child process, but I need to be able to programmatically suspend it and then start it again from where it left off. Java object Process

doesn't seem to provide any way to do this. Does anyone know how I can do this?

thank

+1


source to share


2 answers


On UNIX, you can use Runtime.exec + kill -STOP and -CONT to suspend and resume a process without using JNI.



0


source


Java is not a low level language. Therefore, some interactions with the operating system are not supported.



The only solution is to create the code using a language that can actually work with the OS like C / C ++ and call it from java using JNI.

+2


source







All Articles