Java me HttpConnection与代理服务器的连接

Java me HttpConnection与代理服务器的连接,java-me,proxy,httpconnection,Java Me,Proxy,Httpconnection,我有一个使用HttpConnectionAPI的javame应用程序,在这里我可以轻松地与Proxyless服务器建立连接。但我的问题是如何连接到任何使用代理连接的实时服务器?。我是否需要在Java ME代码中指定代理IP和端口 试试看 HTTPConnection.setProxyServer("my.proxy.dom", 8008); HTTPConnection.dontProxyFor("localhost"); HTTPConnection.dontProxyFor(".mycomp

我有一个使用
HttpConnection
API的javame应用程序,在这里我可以轻松地与Proxyless服务器建立连接。但我的问题是如何连接到任何使用代理连接的实时服务器?。我是否需要在Java ME代码中指定代理IP和端口

试试看

HTTPConnection.setProxyServer("my.proxy.dom", 8008);
HTTPConnection.dontProxyFor("localhost");
HTTPConnection.dontProxyFor(".mycompany.com");
AuthorizationInfo.addBasicAuthorization("my.proxy.dom", 8008, realm, user, passwd);
...
HTTPConnection con = new HTTPConnection(...);
有关提前连接检查的更多信息