我知道TJWS很容易嵌入,但我对此代码没有好运
public class Test {
public static void main(String[] args) {
final Serve serve = new Serve();
new Thread(new Runnable() {
@Override
public void run() {
serve.serve();
}
}).start();
}
}
[Thu Jan 10 17:59:38 CET 2013] Unhandled exception: java.lang.NullPointerException, server is terminating.
java.lang.NullPointerException
at Acme.Serve.Serve.serve(Serve.java:720)
at Test.main(Test.java:17)
Java7 / TJWS 2.3.2最终
答案 0 :(得分:0)
您检查了Serve源代码吗?第720行看起来像:
Socket socket = acceptor.accept();
我怀疑您需要在init()
serve()