java.net.BindException: Permission denied

skyyoung 2002-05-13 02:47:54
在LINUX 上执行TCP的JAVA,显示这个错误,如何解决?

在LINUX里要配置什么?
...全文
423 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
gzwrj 2002-05-13
  • 打赏
  • 举报
回复
this may be help u:
In UNIX environments port numbers below 1024 are reserved and can be bound or used only by root (superuser). So if the non-root users try to run the application they will receive an error message saying that

"java.net.BindException: Permission Denied"

There are two ways to avoid this exception. One way is to login as root and run the program. The other way is to specify a port greater than 1023
skyyoung 2002-05-13
  • 打赏
  • 举报
回复
oh , i forgot the port < 1024 , it's ok now .
uu_snow 2002-05-13
  • 打赏
  • 举报
回复
这和操作系统没关系,你的程序写的有问题
fenghx 2002-05-13
  • 打赏
  • 举报
回复
I think the Port numbers used in your Java programs are not correct. Maybe you use the Port numbers < 1024.
gzwrj 2002-05-13
  • 打赏
  • 举报
回复
How do call tcp java.Can u give the example?

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧