Solved

Proxy Problem

Posted on 1998-08-16
2
288 Views
Last Modified: 2010-03-30
My computer is behind a firewall, how do I write a Java program to access (http, ftp etc) the "outside world" through a proxy? (We have a proxy server with port number 1080.)
0
Comment
Question by:regina081698
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 7

Accepted Solution

by:
yoren earned 100 total points
ID: 1220053
You can set both HTTP and SOCKS proxies:

Properties sysprops = System.getProperties();

sysprops.put("socksProxySet", "true");
sysprops.put("socksProxyHost", "socks.whitehouse.gov");
sysprops.put("socksProxyPort", "1080");

sysprops.put("proxySet", "true");
sysprops.put("proxyHost", "httpproxy.server.com");
sysprops.put("proxyPort", "80");

0
 

Author Comment

by:regina081698
ID: 1220054
thanks!!! :-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to execute a Python program and gather return output in Java 2 49
ejb stateless example 2 40
JAVA API design with micro service cloud in mind 1 76
jsp error 6 43
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question