Question

Normally if I run the following the following command in the rhino shell,

mbp001:rhino1_7R2 user$ java -jar js.jar 
Rhino 1.7 release 2 2009 03 22
js> readUrl("http://www.google.com")

It will return the resultant html markups. However, if I runs it behind a firewall, it will throw an exception (because it is unable to reach the host)

How can I make the Rhino shell aware of the proxy? Is there any -D switch for this purpose?

Was it helpful?

Solution

have you tried the standard java system properties "http.proxyHost" and "http.proxyPort"?

command line would be:

java -Dhttp.proxyHost=proxy.bigcorp.com -Dhttp.proxyPort=9000 -jar js.jar
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top