I would like to configure Java proxy settings on Solaris to use a Proxy Auto Config (PAC) scriptt.
I have found instructions for making the settings on a Windows machine using the Java control panel, but am having trouble finding where/how to make the same setting changes on a Solaris Java install.
I would like to use the Proxy Auto Config (PAC) script, rather than manually setting proxy info per connection, or using a single proxy. I have a need to leverage multiple proxies for different types of URLs.
The article you have provided is about the the Java Plug-in (i.e. the Java runtime environment for browsers) that can be configured through the Java Plug-in Control Panel and applies to:
So, it's really not Windows specific.
Now, if your question is "How do I start the Java Plug-in Control Panel on Solaris", the answer is:
But usually people are not using Solaris for surfing so I'm not really sure that this is what you're looking for (actually, I didn't understand clearly what you want to do).
If you are going to connect programmatically, please note that Java uses two system properties to designate a proxy:
http.proxyHost
andhttp.proxyPort
. For applets, these are automatically set to use the browser's settings. However, in an application you need to set them yourself:As per comment, my understanding is that you want to use a PAC file. To use a Proxy auto-config from Java code and/or Ant with Java 1.5+, you can configure the proxy at the "OS level" and set the system property
java.net.useSystemProxies
totrue
(see section 4) ProxySelector of Java Networking and Proxies) or the-autoproxy
option for Ant. This will make the Java code and/or Ant use the OS proxies.To setup your Solaris host, if you are using Gnome 2.X, you can configure proxies globally through the user interface (System > Preferences > Network Proxy). If you're not using Gnome, setup the following environment variable:
To specify a list of non proxy hosts (if necessary), setup this variable (this is an example):
Sadly the system proxy selector does not handle PAC/WPAD/JS specifications, confirmed by my testing with Windows or MacOS X. Even on Java6, which includes a JavaScript interpreter.
I'm hoping proxy-vole http://code.google.com/p/proxy-vole/ may do the trick.