Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

proxy in java

Status
Not open for further replies.

zeevgetner

Programmer
Dec 24, 2000
37
IL
hi everybody,

i have a program that does http comunication.
my system administrator wants the program to comunicate throgh a proxy server. im tring to make the java environment use a proxy server.

one option that i tired is to use :
jave -DproxySet=true -DrpoxyHost=@@@ -DproxyPort=@@@ myclass
(@@@ are the actual settings).

why doesnt it work?

im using java 1.5 JRE is this a problem?
 
im not getting an error,
it just doesnt use the proxy.

my system administratot monitors the network,
and my program doesnt try to use the proxy, but goes diractly to the ip-adress.

im hoping for a solution that does not involve aditional code.

why do you think m setting doesnt work?

zeev
 
tim (and also dian)

thank you for your help.

the problem i have with tim's idea,

is that i dont have all the sources of the classes
that do the comunication. they are writtne by a business asociate of the company i work in. so i nead a solution that is not based on code.

right now i have one solution that involve installing a program that ctransfer al the comunication to a proxy,
(and it works)

but i wish i found a way to have java work with a proxy.

zeev
 
As I suggested, write a test program, use your settings, debug it and maybe you can find why it's not working and apply it to your actual software.

Cheers,
Dian
 
You have :

-DrpoxyHost=@@@

but you want :

-DproxyHost=@@@

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
... and it will only work for the class HttpURLConnection - it will not work if you use java.net.Socket directly yourself.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top