J
john
I used NetBeans + JDK 1.5.2 to write a simple program using the SocketServer
class, on my Windows 2000 pc. The program dies not die when I kill it. I
kill it by right-clicking on the process in the execution window and
selecting "terminate." It appears to die within NetBeans but when I start
it, the SocketServer instance complains that the port is not available. The
Windows command "netstat -a" confirms that there is still a process
listening at the port, and Windows Task Manager also shows a java.exe
process running. If I kill that java.exe process from the Task Manager, then
everything is ok again -- I can restart my program and listen on the port
again.
What is the right way to kill a program like mine, so that it releases the
port?
Thanks,
John
(remove the pachyderm to reply)
class, on my Windows 2000 pc. The program dies not die when I kill it. I
kill it by right-clicking on the process in the execution window and
selecting "terminate." It appears to die within NetBeans but when I start
it, the SocketServer instance complains that the port is not available. The
Windows command "netstat -a" confirms that there is still a process
listening at the port, and Windows Task Manager also shows a java.exe
process running. If I kill that java.exe process from the Task Manager, then
everything is ok again -- I can restart my program and listen on the port
again.
What is the right way to kill a program like mine, so that it releases the
port?
Thanks,
John
(remove the pachyderm to reply)