java.net.SocketException: Software caused connection abort: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.setBlockDataMode(Unknown Source)
at java.io.ObjectOutputStream.writeNonProxyDesc(Unknown Source)
at java.io.ObjectOutputStream.writeClassDesc(Unknown Source)
at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
at java.io.ObjectOutputStream.writeObject0(Unknown Source)
at java.io.ObjectOutputStream.writeFatalException(Unknown Source)
at java.io.ObjectOutputStream.writeObject(Unknown Source)
at client.ClientDemo.main(ClientDemo.java:92)
Exception in thread "main" java.net.SocketException: Socket closed
at java.net.SocketOutputStream.socketWrite(Unknown Source)
at java.net.SocketOutputStream.write(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.drain(Unknown Source)
at java.io.ObjectOutputStream$BlockDataOutputStream.flush(Unknown Source)
at java.io.ObjectOutputStream.flush(Unknown Source)
at java.io.ObjectOutputStream.close(Unknown Source)
at client.ClientDemo.main(ClientDemo.java:334)
sjava.net.SocketException: Software caused connection abort: socket write error
Exception in thread "main" java.net.SocketException: Socket closed
根據這兩個判斷,你應該是在寫操作之前就關閉了socket吧?仔細檢查下
at client.ClientDemo.main(ClientDemo.java:**92**)
at client.ClientDemo.main(ClientDemo.java:**334**)
根據這兩個可以知道錯誤大概發生在92行和334行,從這裡入手檢查試試