The command line should be:
java -Dhttp.proxyHost=proxyhost -Dhttp.proxyPort=99999 URLReader
where proxyHost is the host name or IP address of the proxy host
proxyPort is the port the the proxy is listening on
Cheers
Chris
john wrote:
i sent an earlier post as to how to set the proxy server via the command line. well i just found in the java.sun site and the command line parameters that need to set on a unix box are as follows........java -Dhttp.proxyHost=proxyhost [-Dhttp.proxyPort=portNumber] URLReader question is that how do we enter this. via the command line... I get the following error if I enter it via the command line as above, Exception in thread "main" java.lang.NoClassDefFoundError: URLReader please let me know as to what is error .... earlier post that i posted............ --- john <[EMAIL PROTECTED]> wrote: > > i have a small java program that goes and accesses > a web page. (used the URL class) > the java program works fine, but how do i force it > to use a proxy server. I mean when i run the java > program via the command line it goes and fetches > the http web page as mentioned in the arguments > > java test http://www.xyz.com > > one can configure one's web client browser to use > the > proxy server and all the accesses are routed via the > > proxy server. > can someone let me know as to how to do i force > my java program to use a proxy server ? > > the second problem is about the contents that are > donwloaded. if it is a plain simple page with text > and > gif files it is fine. but if the page has some class > files then > these class files cause a lot of exceptions etc as > the > contents are being (tried to be interpreted by the > via the command prompt) > Any way this problem is secondary and the first one > is > how to route the requests via a proxy server. > > thanks > john > > __________________________________________________ > Do You Yahoo!? > Send instant messages & get email alerts with Yahoo! > Messenger. > http://im.yahoo.com/ > __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ ---------------------------------------------------------------------- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]