阅读背景:

如何在另一个类中杀死一个类的实例?

来源:互联网 

I'm making a client-server application, in which the user can turn on or switch off the server from a gui; in order to let it work, I use a SwingWorker nested class. All seems to work correctly, but when I switch off the server and re-turn it on it doesn't work, probably because there is still another instance open of it that can't be overwritten: server is blocked on the accept() method. I want to kill the previous instance when the user presses the switch off button, but I don't know how.I'm making a client-server application, in whic




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: