50
votes
13answers
76k views

How do I set the proxy to be used by the JVM

Many times, a Java app needs to connect to the Internet. The most common example happens when it is reading an XML file and needs to download its schema. I am behind a proxy server. How do I set my ...
20
votes
5answers
28k views

How do I make HttpURLConnection use a proxy?

If I do this... conn = new URL(urlString).openConnection(); System.out.println("Proxy? " + conn.usingProxy()); it prints Proxy? false The problem is, I am behind a proxy. Where does the JVM get ...
15
votes
4answers
11k views

Setting JVM/JRE to use Windows Proxy Automatically

I did see the question about setting the proxy for the JVM but what I want to ask is how one can utilize the proxy that is already configured (on Windows). Here is a demonstration of my issue: ...
15
votes
3answers
1k views

How to access dynamic proxies from eclipse network settings?

I am working on an Eclipse plugin which needs to connect to a remote server. I am trying to use the Eclipse network settings to get the proxyHost and Port. I have been able to get the "Manual" ...
14
votes
3answers
1k views

Hibernate Envers: Initializing Envers Proxies

In Hibernate Envers, all related collections of an entity are loaded lazy, regardless of what fetch type is set. So when auditquerying for entity that has a collection of other entities (both audited, ...
12
votes
2answers
210 views

Redirecting an ip in Java

For the past few weeks, I have been scouring the internet, the minds of computer programmers, and just a few random people over the situation I am looking to overcome. Basically, what I am trying to ...
12
votes
1answer
448 views

How can I proxy a Java class with overloaded methods in Clojure?

For example, given a Java class like: public class Foo { public String bar(String x) { return "string " + x; } public String bar(Integer x) { return "integer " + x; } } How can I ...
11
votes
5answers
20k views

Authenticated HTTP proxy with Java

How can I configure the username and password to authenticate a http proxy server using Java? I just found the following configuration parameters: http.proxyHost=<proxyAddress> ...
10
votes
4answers
5k views

How does Hibernate create proxies of concrete classes?

To the best of my knowledge, creating a dynamic Java proxy requires that one have an interface to work against for the proxy. Yet, Hibernate seems to manage its dynamic proxy generation without ...
10
votes
3answers
2k views

How to set Http Proxy in an applet

For a java desktop application after we set these properties System.setProperty("java.net.useSystemProxies","true"); System.setProperty("http.proxyHost", "1.1.1.1"); ...
9
votes
2answers
5k views

How can I use an HTTP proxy for a JAX-WS request without setting a system-wide property?

I have an application that needs to make a SOAP client request to a system on the Internet, so it needs to go though our HTTP proxy. One can do this by setting system-wide values such as system ...
8
votes
2answers
2k views

Usefulness of java dynamic proxies vs regular proxies

I need some advice to which scenarios a dynamic proxy would prove more useful than a regular proxy. I've put alot of effort into learning how to use dynamic proxies effectively. In this question, ...
8
votes
3answers
29k views

How do a send an HTTPS request through a proxy in Java?

I am trying to send a request to a server using the HttpsUrlConnection class. The server has certificate issues, so I set up a TrustManager that trusts everything, as well as a hostname verifier that ...
8
votes
2answers
5k views

How to get proxy settings from system settings in Java

I'm looking form way how to get system proxy information in Java under Windows, but I've found just one way. But it does not work for me. public static void main(String[] args) throws Throwable ...
7
votes
2answers
497 views

Adding fields to a proxied class in Clojure

I'm using "proxy" to extend various Swing classes in a Clojure GUI application, generally with code that looks something like: (def ^JPanel mypanel (proxy [JPanel] [] (paintComponent ...

1 2 3 4 5 40
15 30 50 per page