But i was asked to integrate this into java code and creat an APi, how do i do that.
2) I was given a specification saying that we cant kill a process on server cleanly using java, so write native code in C and intgrate into java using JNI.
But how to kill a process using C?
Is there a way to kill it cleanly in java?
will destroy() method kill a process cleanly?
HELP ME OUT PLEASE...
Im a fresher into the company, so facing an uphill task understanding things..
karthik deepak wrote:I need to write code to kill a process using C language.
I should write C code and use it in java using JNI
Is there an API in C that kills a process given its name or something like pid in unix?
Actually you can do it with taskkill command that default shipps with windows. You can check the syntax. And in C language and if you are using borland editor import dos.h and use int86 interrupt handler to kill a process. There is also the unixtodos function. Hope you will get the idea.