Recently I spent a few days creating and compiling a Java Deployment Rule Set and signing it with an Active Directory certificate. After much stress it worked like a charm on my development machine.
I tested some of my rules by using the Java verify page, whereby it displayed the version of Java that the browser was currently using.
However in the Live environment the Java verify page just wouln’t render the Java applet. I added Java.com to the trusted sites zone, and then I got a grey box in place of the applet.
In the Java control panel I navigated to the Advanced tab and made sure to select ‘Show console’. The next time I launched a new session of the Java verify page in Internet Explorer I could see what was happening:
I changed my LAN setting to use a static proxy/port and re-ran the Java Verify page. This time it worked and the console showed that it was returning a proxy address!
Since we’d deduced it wouldn’t work with the PAC file, one potential solution was to use Java network settings (Java control panel > General tab > Network settings) to point to a proxy, and leave the LAN settings as the auto config PAC file for all browing in Internet Explorer. However when I tested this, once again I saw “proxy=DIRECT”!
Upon further testing I noticed that several versions of Java 7 ignore the Java Network Settings! These are:
Finally these three versions honour the Network Settings, and the proxy was correctly used:
But you’ll notice I did say that this was a ‘potential’ solution. It still wasn’t an ideal solution. Why wasn’t the auto config PAC file returning a valid proxy? Well, I debugged our corporate PAC file and lo and behold, I noticed a missing semi-colon!
somevariable = “DIRECT”
should have been
somevariable = “DIRECT”;
So Internet Explorer parsed the PAC file ok, and ‘understood’ that there was a missing semi-colon and carried on routing users correctly when they were browsing the internet. However Java’s parsing of the PAC file was obviously more strict, noticed a semi-colon was missing and consequently failed and reverted to a ‘DIRECT’ connection! Once I fixed this issue Java in Internet Explorer burst in to life!