How to use mozilla rhino behind a firewall?

Usually, if I run the following command in a 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 resulting html markup. However, if I run it behind a firewall, it will throw an exception (because it cannot communicate with the host)

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

+3
source share
1 answer

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

Command line

:

java -Dhttp.proxyHost=proxy.bigcorp.com -Dhttp.proxyPort=9000 -jar js.jar
+3
source

Source: https://habr.com/ru/post/1716517/


All Articles