• Post Reply Bookmark Topic Watch Topic
  • New Topic

JVM and proxy settings  RSS feed

 
geetha chandran
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
I am trying to contact a site say "www.data.com", through my JAVA program using http protocol. My machine is connected to the net via a proxy with the IP and port as: 192.170.10.29:8002.
I have heard that, I have to set the above said proxy IP and port, in the JVM. But dont know how to do that...Also, in my machine, I am having only JDK1.2.2...that is it...what I have to do further, for setting the above said....I dont want to set the above said values, programmatically....
could anyone pl. post a reply,
Geetha C.
 
gautham kasinath
Ranch Hand
Posts: 583
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy,
It is very simple.
You would be used to execute the code by typing
"java YourClass" - right??!!
now all that you have to do introduce a coupla switches.
-Dhttp.proxyHost=hostname and -Dhttp.proxyPort=port
so it will be
java -Dhttp.proxyHost=192.170.10.29 -Dhttp.proxyPort=8002 YourClass
That will get it working.
Regds
Lupo
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!