错误:java.net.BindException
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(Unknown Source)
at java.net.AbstractPlainDatagramSocketImpl.bind(Unknown Source)
at java.net.DatagramSocket.bind(Unknown Source)
at java.net.DatagramSocket.(Unknown Source)
at java.net.DatagramSocket.(Unknown Source)
at java.net.DatagramSocket.(Unknown Source)
at udp.Send.main(Send.java:12)
这个错误是端口冲突造成的,解除端口占用或者更改自己使用端口号就行了。
(java)java.net.BindException:
最新推荐文章于 2024-08-17 20:41:32 发布