无法从一台计算机远程接收数据
所以我编写了这个与数据库交互并充当服务器的 jar。问题是,我只能在局域网上或从另一台计算机运行该 jar 时才能与该 jar 进行交互。有问题的系统正在运行 Windows XP,并且禁用了防火墙,是的,它已正确设置了路由器,因为我可以启动 Web 服务器并远程查看它。我不知道问题是什么,因为防火墙被禁用并且 jar 在同一网络上的其他计算机上工作。
注意:我之前注意到一个异常“java.net.SocketException:协议族不支持地址族”
So I wrote this jar that interacts with a database and also serves as a server. Problem is that I can only interact with that jar when I'm on the lan or run the jar from a different computer. The system with the problem is running windows xp with the firewall disabled and yes it is correctly set up with the router as I can launch a web server and view it remotely. I have no clue what the problem would be as the firewall is disabled and the jar works on other computers on the same network.
Note: I was noticing an exception "java.net.SocketException: Address family not supported by protocol family" earlier
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
1. 打开网络连接
2. 右键单击任何本地区域连接,然后单击属性。
3.单击“安装”。
4.在“选择网络组件类型”对话框中,单击“协议”,然后单击“添加”。
5. 在“选择网络协议”对话框中,单击“Microsoft TCP/IP 版本 6”,然后单击“确定”。
6. 单击“关闭”保存对网络连接的更改。
最后重新启动您的应用程序
1.Open Network Connections
2.Right-click any local area connection, and then click Properties.
3.Click Install.
4.In the Select Network Component Type dialog box, click Protocol, and then click Add.
5.In the Select Network Protocol dialog box, click Microsoft TCP/IP version 6, and then click OK
6.Click Close to save changes to your network connection.
Lastly Restart your application
请参阅:http://www.martinahrer.at/2009/04/16/javanetsocketexception-address-family-not-supported-by-protocol-family-bind/
一般来说,问题与IPv6 支持。尝试用谷歌搜索您的例外文本,我相信您会很快找到答案。
See this: http://www.martinahrer.at/2009/04/16/javanetsocketexception-address-family-not-supported-by-protocol-family-bind/
Generally the problem is related to IPv6 support. Try to google your exception text and I am sure you will find an answer quickly.