阅读背景:

无法从外部客户端连接到Java Server

来源:互联网 

I'm creating a personal tool that serves files through HTTP in Java. For the HTTP Server part I'm using the com.sun.net.httpserver.HttpServer package. When I connect from my own PC using either localhost or the external hostname, it works, but when I try to connect from an external client to it, it just doesn't. I'd also like to mention that the java default policies file hasn't ever been modified and that I'm behind a router, and that the port is properly forwarded. I tried modifying the policies file but I didn't have any success, although I don't know if the settings were correct or if they got applied, and I read a thread in which there was a similar problem, but using rmi which has been solved by setting the java.rmi.server.hostname system property, but I don't think this is also available in my case because the server uses TCP. I'm creating a personal tool that serves files




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: