A java program that can terminate another java program -
I have written a Java program which can read the APC code of the RFID card when the card is shown to the sensor. Now, I need a separate program that can finish the program reading the card. In my program, I have written a work that can stop reading the card, but I do not know how to use that function in another program to run the current program
< Div class = "post-text" itemprop = "text">
This question is very open and is not really Java-specific
Some options above:
- < Li>
-
The first process works as a socket-based server and the second process accesses it as a client. This is good because it works on the network, if you need to expand the scope of the IPC, then you can take advantage of the existing prototype (such as to add authentication, additional work beyond extra term etc.), and you It can take advantage of existing clients (for example if you use HTTP, you might use curl instead of making some space in Java for the second process).
-
Use a messaging platform like Aak, or some RPC library if you want to keep your mind inside GVM and about as much as possible about anything else. You want to learn, you can take one of these methods, but you want to end by adding both the processing to an extent which are not necessary. / P>
When you store the PID of the first process in the file, you start it Es, and then the second process can stop it by sending a kill signal. This is a light option because it does not need to modify the first process, but there is no loss of platform-specific and the machine is not able to cross the boundary.
Comments
Post a Comment