Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java doesn't bypass proxy for IPs using (IP-Subnet) combination ??

843790Sep 1 2008 — edited Sep 1 2008
Dear All,

On Mac OS I am getting the below problem, I didn't tried it on Windows may be this problem may not occur there.

Problem:---
On Mac OS (Leopard).
When bypassing proxy IP in "Network Settings->Advanced...->Proxies->Bypass Hosts & Domains" field is given as IP-Subnet combination, e.g. 192.168.60/24, then in Java while trying to connect with HttpUrlConnection's connect() method, and then getting response code using HttpUrlConnection's getResponseCode() method it returns response code 407 i.e. Proxy is required. But safari works well for that,

This Java API works well when I directly give IP as 192.168.60.X it works (Java API) well.

I tried System.getProperties().setProperties("http.nonProxyHosts","192.168.60/24"), then also it doesn't works.

Please tell me any solution, suggestion or workaround or any document that tells it may not be done through Java API.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 29 2008
Added on Sep 1 2008
3 comments
721 views