3

I am in need to supply old Java versions (1.4, 1.5 and 1.6) for three different webpages which require the Java Plugin in those specific outdated versions.

My environment is a Windows Server 2012 Terminal Server. I've already contacted the suppliers of those three webapps, but they won't update them to support a current Java version. However those applications are critical for our business - we simply can't replace them.

I'm thinking now of a solution which basically does the following:
Package a Firefox together with the required Java version like Firefox portable. This packaged version should be limited to allow only to open a limited set of URLs (those odd webapps). It should be possible to run those "packaged" Firefoxes simultaneously with the up-to-date regular Version of the browser.

Is there any out-of-the-box solution or tool which allows to create such a package of a browser and a specific (old) browser version?

My requirements are

  • Users should be able to start the different browser versions with different Java Plugin versions at the same time on the same terminal server
  • The packaged browsers with the old Java versions should be limited to those odd old webapps (to avoid security risks when accessing the internet with an outdated browser/Java version)

I've already tried to use Firefox Portable but it isn't allowed to run a portable and a regular version of Firefox at the same time (only one Firefox binary can run at the same time on the same terminalserver). It's also not possible to run multiple different versions of the portable Firefox at the same time.

1 Answer 1

3

To run one separate instance of portable Firefox, copy FirefoxPortable.ini ( in \FirefoxPortable\Other\Source\ ) into \FirefoxPortable (where the FirefoxPortable.exe resides), and in FirefoxPortable.ini set AllowMultipleInstances=true. Please note that jPortable doesn't seem to have the required previous versions.

Another option would be to use XULRunner. Download and unzip xulrunner-1.8.0.4.en-US.win32.zip (to e.g. C:\xulrunner). Also, download (link is from Getting started with XULRunner) and unzip an example xulrunner app (helloWorld) that can be used as a template (to e.g. C:\helloWorld).

In C:\helloWorld the only required folders/files for this example are chrome, defaults, application.ini, and chrome.manifest.

In C:\helloWorld\application.ini, set MaxVersion=49.0.

In C:\helloWorld\chrome\content\hello.xul, delete/replace the section from <caption label= ... up to and including </description> with this: <browser src="http://internalJava_1.5_Site" type="content" flex="1"/> Please see the Elements (XUL) link for window and browser details.

In C:\helloWorld\defaults\preferences\prefs.js add (towards the end and also add an empty line as the last line):

pref("plugin.scan.SunJRE", "49.0");
pref("plugin.scan.plid.all", false);

Copy NPJPI150_22.dll and NPOJI610.dll from Java JRE 1.5 install_directory\bin into C:\xulrunner\plugins.

In a CMD prompt enter: C:\xulrunner\xulrunner.exe C:\helloWorld\application.ini. If all's good close the app/website, delete/replace the two copied DLLs in C:\xulrunner\plugins with the corresponding DLLs from another Java version (e.g. Java 1.4), replace http://internalJava_1.5_Site in C:\helloWorld\chrome\content\hello.xul with the corresponding Java 1.4 site, and check.

You can later clone the xulrunner and helloWorld folders twice, make the necessary src= changes in the three hello.xul files, and copy the correct version DLLs (two each) into the three \plugins folders.

Optionally, create three shortcuts in C:\Users\Public\Desktop\ and/or C:\ProgramData\Microsoft\Windows\Start Menu\ to run the three versions. e.g. C:\xulrunner\xulrunner.exe C:\helloWorld\application.ini

To lock down the xulrunner/xulrunner apps, in C:\xulrunner\defaults\pref\xulrunner.js add (and leave the last line blank):

pref("general.config.obscure_value", 0);
pref("general.config.filename", "mozilla.cfg");

Next, create the mozilla.cfg in C:\xulrunner and add:

//
lockPref("plugin.scan.SunJRE", "49.0");
lockPref("plugin.scan.plid.all", false);
lockPref("plugin.scan.4xPluginFolder", false);
lockPref("plugin.scan.Acrobat", "99.0");
lockPref("plugin.scan.Quicktime", "99.0");
lockPref("plugin.scan.WindowsMediaPlayer", "99.0");
lockPref("javascript.enabled", false);
lockPref("network.proxy.no_proxies_on", "internalJava_1.5_Site"); 
lockPref("network.proxy.autoconfig_url", "");
lockPref("network.proxy.type", 1);
lockPref("network.proxy.ftp", "127.0.0.1");
lockPref("network.proxy.ftp_port", 80);
lockPref("network.proxy.gopher", "127.0.0.1");
lockPref("network.proxy.gopher_port", 80);
lockPref("network.proxy.http", "127.0.0.1");
lockPref("network.proxy.http_port", 80);
lockPref("network.proxy.socks", "127.0.0.1");
lockPref("network.proxy.socks_port", 80);
lockPref("network.proxy.socks_version", 5);
lockPref("network.proxy.socks_remote_dns", false);
lockPref("network.proxy.ssl", "127.0.0.1");
lockPref("network.proxy.ssl_port", 80);

Lock (policy) file, about:config Entries (preferences). To troubleshoot a setting, add double slashes (//) before a lockPref or pref to comment out the setting/line.

PS: Notepad++ could be very helpful for viewing/editing the various files while preserving the correct encoding.

What XULRunner Provides, XULRunner tips, XULRunner FAQ, application.ini, XUL, XUL Template Primer, XUL Structure, Elements (XUL), Properties (XUL), Attributes (XUL), Events (XUL), Methods (XUL), XUL Tutorial

1
  • It worked for me with Firefox 1.8.x after installing the old Java Runtimes alongside the up-to-date JRE, but with no newer version (3+). Probably caused by a change how plugins are handled, there is no plugins directory anymore.
    – CodeManX
    Oct 23, 2014 at 20:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .