Java – how does eclipse terminate a running program?

In eclipse, when you run a program, there is a good red square button to prevent it I wonder how this is done Eclipse just brutally kills the corresponding process, or performs some good security verification in the process state, and then gently asks it to terminate itself or something?

Solution

How does eclipse "validate" in the process state or require the program to terminate itself?

It must be part of the Java standard API that all Java programs must implement There is nothing like this Ergo: eclipse can't do this. All it can do is send POSIX SIGTERM. However, because there is no Java API to respond to it, it can't be captured effectively, which leads to the serious termination of the process

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>