One Automation Java UI startup script

Discussion created by Michael_Lowry on Aug 9, 2016
Latest reply on Sep 14, 2017 by Michael_Lowry
Back in December of 2013, I documented my technique for setting up different GUI setups for different UC4 systems/environments. Later, in May of this year, I described a more recent revision to this approach, based on using a BAT script to launch multiple User Interface configurations. Here is the most recent update to my setup.


  • The Windows batch script has been replaced by a PowerShell script.
  • There is now one UCDJ binary directory per UCDJ version, instead of one per Automation Engine system.
  • The startup script now copies configuration and help stub files to a subdirectory of the user’s home directory, if not already there.
  • Log and trace files are now also written to sub-directories of the user’s home directory.
  • The JRE version can now be specified as an argument to the startup script.
UC4 User Interface — multiple configurations


This folder contains a set of scripts and files to aid running the Automic ONE Automation Java User Interface (UCDJ) with multiple different configurations. It facilitates running:
  •  Different versions of UCDJ
  •  Under different JREs
  •  With different initial environment variables
  •  With different XML configuration files (uc4config.xml and login_dat.xml)
  •  Against different Automation Engine systems (development, test, production)
  •  With a color-coded environment-specific application icon that matches the color hard-coded in the uc4config.xml file
Several pieces must be put in place before this set-up will work:
  1. Place the contents of this folder in the directory
    "C:\UC4\UC4 User Interface".
    The shortcuts will not work unless everything is put into this exact location.
  2. Download and extract the ONE Automation Java User Interface fromdownloads.automic.com. Place the files in a sub-directory under UCDJ in this directory. The name of the sub-directory should be based on the version of the UI. E.g., if you use version 11.2.2, place the files in UCDJ\v11.2.2\bin.
  3. Download theJava Runtime Environment(JRE) you wish to use, or more than one if you like. Place the binaries under the Java folder, in a sub-directory named based on the JRE version. E.g, jre1.8.0_102.
  4. For each Automation Engine system to which you wish to connect, create a copy of the ucdj.jar file, with the system abbreviation in the name. E.g., if have three systems named DEV, TEST, and PROD, create three copies of the ucdj.jar file: ucdj-DEV.jar, ucdj-TEST.jar, and ucdj-PROD.jar.
  5. Optionally, if you wish to color-code the application icons, replace the application icon uc432.png located in com\UC4\ucdf\images inside each ucdj-***.jar file. You can choose one of the icons from the icons sub-directory or use your own icon. It should be a 32x32 pixel PNG file. To replace the icon in the JAR file, rename the .jar file to .zip, open the ZIP file in WinZIP, replace the pertinent icon file, save the ZIP, and then rename it back to .jar.
  6. For each Automation Enigine system you have created, create a pair of XML configuration files in the config sub-directory. E.g., for the AE system named DEV, create uc4config-DEV.xml and login_dat-DEV.xml. Modify the connection information in each uc4config-***.xml file so that it contains only the host name and CP socket details for that particular AE system. If desired, modify the color definitions too.
  7. Configure the properties of the shortcuts (or create new ones), so that the UC4.vbs script is called with three arguments:
    • The name or abbreviation of the AE system
    • The version number (folder name under UDCJ where the UI binaries reside)
    • The JRE version (folder name under Java where the JRE binaries reside)
    E.g., to run the v11.2.2 UI with the config files for the DEV system, and with JRE version 1.8.0_102, change the target of the shortcut to:
    "C:\UC4\UC4 User Interface\UC4.vbs" DEV 11.2.2 jre1.8.0_102
At Swiss Re, we have shortcuts to run the User Interface with a different color-coding for each of our five different Automation Engine systems:
  • Orange: EXP2
  • Yellow: EXP
  • Blue: DEV
  • Green: ITE (TEST)
  • Red: PROD
The color coding scheme of the application and shortcut icons matches the UI color coding enforced in the corresponding uc4config.xml file. This makes it easy to tell at a glance which system one is working with.

The UC4.vbs script is simply a wrapper that runs the UC4.ps1 script. The only reason the VBS script is there at all is to prevent a command window from appearing. The UC4.ps1 script copies config and help files to a sub-directory of the user's home directory, and then starts the requested UI in the requested JRE and with the requested configuration. At the top of the PowerShell script, you can set the default JRE version, if desired.

I have attached a ZIP file containing a skeleton of this directory. You must provide the UCDJ & JRE binaries.

Directory listing

  • UC4 EXP.lnk
  • UC4 EXP2.lnk
  • UC4 DEV.lnk
  • UC4 ITE.lnk
  • UC4 PROD.lnk
  • uc4.vbs
  • uc4.ps1
  • UC4 User Interface instructions.txt
  • config
    • uc4config-PROD.xml
    • uc4config-ITE.xml
    • uc4config-EXP2.xml
    • uc4config-EXP.xml
    • uc4config-DEV.xml
    • login_dat-PROD.xml
    • login_dat-ITE.xml
    • login_dat-EXP2.xml
    • login_dat-EXP.xml
    • login_dat-DEV.xml
  • icons
    • uc432-blue.png
    • uc432-green.png
    • uc432-orange.png
    • uc432-red.png
    • uc432-yellow.png
    • UCDJ-blue.ico
    • UCDJ-green.ico
    • UCDJ-orange.ico
    • UCDJ-red.ico
    • UCDJ-yellow.ico
  • Java
    • jre1.8.0_66
    • jre1.8.0_73
    • jre1.8.0_91
    • jre1.8.0_92
    • jre1.8.0_102
  • UCDJ
    • v9
      • bin
      • docu
    • v10
      • bin
      • docu
    • v11.1
      • bin
      • docu
    • v11.2.1
      • bin
      • docu
    • v11.2.2
      • bin
      • docu
    • v12
      • bin
      • docu
You can create additional sub-directories under Java and UCDJ as necessary, when you want to use different versions of Java or the User Interface. You can create as many shortcuts as you need, and easily switch between versions and AE systems by changing the arguments passed to the startup script.