thanks to all who responded to my thread for "how to set the proxy server via the command line". The problem was that proxy port no was 8080. ok. but this brings me to another halt ... (sort of) I am have written a small program which goes and downloads a web page given its url. The download is fine and works via proxy servers as well !! however i have two problems now. first when the download contains say some class files , the shell tries to interpret it. and there are lots of unicode characters appearing on the shell window etc. second the java program is pretty slow. ie the download takes a bit more time. I am writing a small tool so that i could download web pages automatically via a proxy server and stress the proxy server. I have a small loop which acts like a robot and picks out a few web pages and downloads them. This helps in analyzing performance of the web server. however the java execution is slow and this does not generate much of traffic via a proxy server. does anyone know how improve performance ? thanks all john --- Christopher Hinds <[EMAIL PROTECTED]> wrote: > Why is the proxyPort parm in those brackets? > > 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] > > > > > > > > > > __________________________________________________ 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]