The Oracle JRE v1.6 or later is used in Builder to generate Component Enabler files. It can also be used with clients that rely on the COM/Java bridging support which the Microsoft JVM has previously provided (for example, VB Clients, Active Server Pages, etc.). This functionality is now being supported by the ActiveX Bridge feature that is available in the Oracle JRE v1.6 or later. The following information describes the procedure required to setup the Component Enabler Development and Runtime environments for use with the Oracle JRE ActiveX bridge functionality.
Development Environment Generate Setup (Oracle JRE - ActiveX Bridge)
To configure your Development environment for use with the Oracle JRE, perform the following:
Download the Oracle Java from the Oracle Java Web Site at https://www.oracle.com/java/technologies/javase-java-archive-javase6-downloads.html.
Install Java, that is, both JDK and JRE.
If you have not already done so, install Component Enabler from the installer.
Depending on your environment configuration, you might need to adjust the necessary levels of security for running the Component Enabler Generator functionality through the Java Plugin. The Java policy file is called “java.policy”“default.policy” and is located in the <JRE_HOME>\lib\security directory.
For example:
C:\Program Files\Java\j2re1.6.0\lib\security\java.policy
In order to provide the Component Enabler generation environment with access to the required machine resources through the Java Plug-in, the following setting is automatically included by the Component Enabler Installation program. In most cases, you will not need to adjust it. However, if it is removed or the policy file is replaced at any stage, you might see security violation errors appearing in the Java Console, and the generate is not completed successfully. If this occurs, you must add the following permission manually.
grant codeBase "file:C:\\NGEN_CE\\lib\\*" { permission java.security.AllPermission;};
While this requires less effort than setting individual permissions, to achieve the necessary results, it does increase the security risk on the machine. It means that a Java application in that codeBase specification will have unrestricted access to the machine resources. When dealing with Unisys supplied components this should not be a problem. However, you might wish to incorporate more stringent security than the above permission provides. If so, you can remove the AllPermissions setting and ensure that the following are the minimum permissions that are set in order for the application to work correctly.
Note: In case of Java 32-bit, the Java.policy file is updated automatically during the installation of the Component Enabler. If you have Java 64-bit installed, then perform the instructions as mentioned above.
To create the Generate.Log file in the C:\Temp directory, add the following permission
permission java.io.FilePermission "c:\\temp\\GENERATE.LOG","write";
To create the output files from the generate (for example, IspecModel classes, ASP Forms, VB Forms) permissions are set by default for the directory “C:\NGEN_CE\Classes”. This directory must match the directory specified in Developer for the output directory of the Component Enabler bundle. For example, if you have specified C:\NGEN_CE\Classes in the Application Bundle details, then the file permission should be:
permission java.io.FilePermission "C:\\NGEN_CE\\classes\\-","read,write";
Before you can generate Component Enabler files from Builder, the Java Plug-In Runtime Parameters need to include the CLASSPATH for the JAR files required by the generate process. Add the classpath settings as a Java Runtime Parameter in the Advanced Tab of the Java Plug-In Control Panel. This allows the ActiveX bridge software to find the Jar files required for the Generate.
For example:
-cpc:\NGEN_CE\classes;c:\NGEN_CE\lib\generate.jar; c:\NGEN_CE\lib\lincapplet.jar;c:\NGEN_CE\lib\lincviewer.jar; c:\NGEN_CE\lib\ASPGenerator.jar;c:\NGEN_CE\lib\WSGenerator.jar; c:\NGEN_CE\lib\VBGenerator.jar;
Note: If you have not installed all the optional generators, ASP, WS, or VB it is recommended to still add these paths on completion of the initial installation to avoid possible future errors if the generators are installed at a later date.
WorkStation Client Setup (Oracle JRE with ActiveX Bridge)
To configure your workstation client runtime environment to use the Oracle ActiveX bridge instead of the Microsoft JVM COM-Java support, perform the following:
In order to run the generated VB client or any other COM-based client that you have developed, you need to register the LINCEnvironment class.
Unlike previous releases, the ActiveX bridge binaries for custom Java generators is not copied to the target machine during the installation of Component Enabler. Instead these files are placed inside a folder, axbridge, in the Component Enabler folder of the Developer installer.
The installer of Component Enabler gives priority to Java 64-bit. If the machine has both Java 32-bit and 64-bit installed, Component Enabler gets bound to Java 64-bit.
In order to deploy the Component Enabler client application to another machine, copy the axbridge folder and its contents to the <JRE_HOME> in the target machine.
This step also copies the LINCApplet.Jar file that contains the LINCEnvironment class into the corresponding “lib” directory.
For example:
<JRE_HOME>\axbridge\lib\LincApplet.jar
Notes:
To determine whether you have Java 32-bit or 64-bit installed. You can check the registry key as follows:
For example:
If you have Java 32-bit installed in 32-bit environment:
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
and
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit
If you have Java 32-bit installed in 64-bit environment:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\
JavaSoft\Java Runtime Environment
and
HKEY_LOCAL_MACHINE\SOFTWARE\\Wow6432Node\
JavaSoft\Java Development Kit
If you have Java 64-bit installed in 64-bit environment:
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
and
HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Development Kit
Determine the JRE home.
For example:
For Java 1.6 32-bit in a 64-bit environment:
C:\Program Files (x86)\Java\jre6
For Java 1.8 64-bit in a 64-bit environment:
C:\Program Files\Java\JRE1.8.0_92
Once the dll is in place on the client machine, run the command prompt as Administrator, execute the regsvr32 command to register the dll.
For example:
In a 32-bit machine:
C:\Windows\System32\regsvr32.exe /s "<JRE_HOME>\axbridge\bin\LINCEnvironment.dll"
and
C:\Windows\System32\regsvr32.exe /s "<JRE_HOME>\axbridge\bin\GenerateProxyLDA.dll"
In a 64-bit machine:
C:\Windows\SysWOW64\regsvr32.exe /s "<JRE_HOME>\axbridge\bin\LINCEnvironment.dll"
and
C:\Windows\SysWOW64\regsvr32.exe /s "<JRE_HOME>\axbridge\bin\GenerateProxyLDA.dll"
In your application, specify the class to be used when creating the LINCEnvironment object. For a generated VB application, modify the Class_Initialize() subroutine of the EAEEnvironment.cls module, in order to select the appropriate method for creating the LINCEnvironment object. Use the following line of code for the Oracle ActiveX bridge environment:
Set mobjLinc = CreateObject("LINCEnvironment.Bean.1") ’ Oracle JVM with ActiveX bridge
Ensure the alternative line of code for using the Microsoft JVM is commented out.
Add the classpath settings as a Java Runtime Parameter in the Advanced Tab of the Java Plug-In Control Panel. This allows the ActiveX bridge software to find the Component Enabler IspecModel classes that have been deployed to the workstation.
For example:
-cp c:\NGEN_CE\classes;
Update the Java policy file. Depending on your environment configuration, you might need to adjust the necessary levels of security for running the VB Client using the ActiveX bridge through the Java Plugin. The Java policy file is called “java.policy”“default.policy” and is located in the <JRE_HOME>\lib\security directory.
For example:
C:\Program Files\Java\j2re1.6.0\lib\security\java.policy
The following settings might need to be added to provide the Component Enabler Runtime environment with access to the required machine resources. If they are omitted, you might see security violation errors appearing in the Java Console, and the client application will not run successfully.
Socket Permission – This grants access to the machine that hosts your Agile Business Suite Runtime application:
For example:
permission java.net.SocketPermission "HostComputer", "connect,resolve"; // Where Host Computer is the computer name on the Domain or the IP Address.
Runtime Permission – The following two entries might be necessary when running the generated VB client application
permission java.lang.RuntimePermission "modifyThreadGroup"; permission java.lang.RuntimePermission "modifyThread";
File Permission – If you have set up the Client application to perform logging using the Component Enabler Log object, you need to specify a File Permission giving the name and location of the log file.
For example:
permission java.io.FilePermission "c:\\temp\\VBClient.log","write";
Note: An alternative to setting individual permissions for either the development or runtime environment, would be to set the AllPermission permission on the Component Enabler codeBase directory.For example:grant codeBase "file:C:\\NGEN_CE\\lib\\*" { permission java.security.AllPermission; };
While this requires less effort to achieve the necessary results, it does increase the security risk on the machine. It means that a Java application in that codeBase specification will have unrestricted access to the machine resources. When dealing with Unisys supplied components, this should not be a problem.