Skip to main content

Accessing a web page through a firewall

No replies

By default the JavaHelp libraries will not be able to access files that
are outside a firewall. This is because the default proxy and proxy
port are set to none and 80. However, the http.proxyHost and optionally
http.proxyPort System properties can be easily set to override the
default settings. Both properties can be set either in the code or on
the command line. The code below is an example of setting the proxy
attributes in code:

// set the old named properties for older VMs
System.setProperty( "proxyHost", proxyHost );
System.setProperty( "proxyPort", portStr );

// set the new properties for 1.3+
System.setProperty( "http.proxyHost", proxyHost );
System.setProperty( "http.proxyPort", portStr );

On the command line use -D option. For example to activate the hsviewer
with proxy support you would use the following command:

java -Dhttp.proxyPort=8080 -jar hsviewer.jar

Note: The proxyPort is set to 80 by default if a proxyHost is defined.


You may leave the list at any time by sending message with no subject and
are available at
Submit bug reports at