• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JVM and proxy settings

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 583
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic