Can Java program establish JDBC Connection via Proxy Server

≯℡__Kan透↙ 提交于 2020-03-14 12:55:41

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!