Migrating from Legacy Java Applet deployment to using DeplyJava.js
Posted by Chris Kuhlman, Last modified by Aly Essa on 20 May 2016 05:44 PM
In the past FileCatalyst/Unlimi-Tech used its own method of showing applets in browsers. As more browsers became available, Java took it upon themselves to release a standard way to deploy these applets within the browser. 

This article will show you how to migrate the legacy javascript files to use the new deployJava method.  

Before making any changes, make a backup of your existing JavaScript file or server side script file that contains the JavaScript code to launch the applet. 

Download the latest version of the applet you have and extract it to an accessible location. 

In the extracted folder you will see the default JavaScript file we ship out. Edit it and populate it with the settings from your existing JavaScript file or Server Side Script. 

Copy the deployJava.js that was in the download package to the same folder location as the existing JavaScriipt file or Server side script file.

If you wish to update the applet, copy the latest .jar file to this location and override the one that is there. 

Add the following line
<script type="text/javascript" src="deployJava.js"></script> in your HTML or Server side script file. This line has to go above the line that calls the applet JavaScript file or the <script> tag that has the applet deploy code in it. 

Here is a comparison between the old .js format and the new .js format.

Old .js format looks like this
// Connection related settings
var server                      = "";
var port                        = "";
var user                        = "";
var pass                        = "";
var encrypt                     = "";
var ek                          = "";
var clientConnectKey            = "";     
var enableSSL                   = "";
var maxRetries                  = "";
var waitRetry                   = "";

New .js format looks like this
var parameters = {
    server			             :"",
    port			             :"",
    user			             :"",
    pass			             :"",
    mode			             :"",   
    enableSSL		             :""

var attributes = {
    name: "FileCatalyst",
    code: "unlimited.fc.client.FileCatalystCart.class",
    archive: "FileCatalystApplets.jar",
var version = '1.5';
if (typeof(deployJava) == 'undefined'){
    document.write("<h2>deployJava.js is missing, make sure that you also include deployJava.js in your html</h2>");
    deployJava.runApplet(attributes, parameters, version);


Comments (0)