本帖最后由 天涯追梦 于 2014-4-16 20:09 编辑
运行程序时不知为何出现错误Exception in thread "main" java.net.BindException: Address already in use: Cannot bind at java.net.DualStackPlainDatagramSocketImpl.socketBind(Native Method)
at java.net.DualStackPlainDatagramSocketImpl.bind0(DualStackPlainDatagramSocketImpl.java:81)
at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:95)
at java.net.DatagramSocket.bind(DatagramSocket.java:376)
at java.net.DatagramSocket.<init>(DatagramSocket.java:231)
at java.net.DatagramSocket.<init>(DatagramSocket.java:284)
at java.net.DatagramSocket.<init>(DatagramSocket.java:256)
at cn.itcast.net.udp.chat.ChatTest.main(ChatTest.java:25)
程序代码如下
求大神帮帮忙。。谢谢!!
|
|