日期:2014-05-19 浏览次数:20881 次
static {
Runtime.getRuntime().addShutdownHook(new Thread() {
public void run() {
while (true) {
try {
Thread.sleep(1000);
System.out.print("ok");
} catch (Exception e) {
e.printStackTrace();
}
}
}
});
}
------解决方案--------------------