问题
I want to communicate to Oracle DB Server which sits outside my network via the proxy server. I can access the web application hosted on the same machine via Browser with proxy settings. Can a simple Java program establish JDBC Connection thru the proxy server?
*To provide an example will be better *
Regards.
回答1:
If the proxy is only a HTTP proxy, then no. But if the proxy transfers TCP/IP trafic, then you can.
How to do that, look at How do I set the proxy to be used by the JVM or http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html
来源:https://stackoverflow.com/questions/12404747/can-java-program-establish-jdbc-connection-via-proxy-server