-    INSTALLING 3GLs+UD5/JNI DRIVER    

How to install and configure 3GLs+UD5/JNI Driver

This topic covers both the installation of the March Hare utility 3GL's DLL, and the UD5/Java Native Interface driver. You may install both or either one of these tools since they are not interdependant.

Before you install the UD5/JNI+MW1 driver you should either:

The current version of these is 1.3.1. They are available for free download from the JavaSoft web site: http://java.sun.com/j2se/1.3/. NOTE: The Microsoft Java Runtime is not sufficient to use UD5/JNI+MW1.

After you use the installation program to install the tool into your Uniface directory you need to perform the following additional activities:

Please note:

You do not have to uninstall any other drivers or March Hare ToolKit, they share no code except this help file.

1.Modify your configuration file (usys.ini/usys.asn) to load the ud5.dll.

Find the configuration file in your Uniface installation:

Uniface VersionDirectory of Configuration FileSection
SixC:\windows\usys61.ini or
C:\winnt\usys61.ini
[dlls]
7.1Usys:bin\usys.ins[uniface_dlls]
7.2Usys:bin\usys.ini[uniface_dlls]
8.2Usys:adm\usys.asn[USER_3GL]

In the nominated section add ud5.dll,mh3gls.dll, eg:

Uniface 7.2.02
[uniface_dlls]
demandload=c:\usys72\bin\ud5.dll,c:\usys72\bin\mh3gls.dll,...

Uniface 8.2.01
[USER_3GL]
.\ud5.dll
.\mh3gls.dll

to the end of the demandload line (you may need to specify the full path eg: c:\usys72\bin\ud5.dll).

If you are using a INI file specified from the command line (eg: idf /ini=c:\7205.ini) then you may wish to use the [userdlls] section instead.

2.Modify your usys.asn file.

The following lines may appear in your assignment file in the [DRIVER_SETTINGS] section, to tell the UD5/JNI driver which options to use. Uniface Six assignment files are often not broken into sections, in this case this line can appear anywhere in the assignment file.

USYS$UD5_PARAMS = classpath c:\jdk1.3\jre\lib;c:\usys72\MrchHre
USYS$MW1_PARAMS = classpath c:\jdk1.3\jre\lib;c:\usys72\MrchHre

NOTE: The MW1 setting is only for Uniface version 7.2.04 or higher, if you wish to call Java methods using the Uniface activate proc instruction.

3. Modify system path to include the location of the UD5 shared library.

In order to be able to activate Uniface operations from within your Java programs (eg: the HELLOSWING or HELLOWORLDSWING classes supplied), the location of the UD5.DLL shared library must be added to the operating system PATH.

You can change the PATH environment variable in Windows by using the System Control Panel. Open the Control Panels window by the "Start" menu, and selecting "Settings, Control Panels". Open the System Control Panel, by double clicking on the System icon. The PATH environment variable is on the "Environment" tab.

Alternatively you can copy ud5.dll to a directory which is already on the PATH, eg: %SYSTEMROOT%\SYSTEM32 (c:\winnt\system32). If you do this, you must also ensure that Uniface opens the DLL from the same location by altering the INI file.

Congratulations !.

You have now installed the March Hare 3GL+UD5/JNI driver for Uniface.

These links will take you to further articles about how to use the MH3GLs.DLL and the UD6/JNI+MW1 Driver:

A Quick Tour

Use the driver to call useful 3GL's using the perform proc statement, and call Java classes using either the sql or activate proc statements.

[PATHS]
$UD5 UD5:
$MW1 MW1:

[SERVICES_EXEC]
HELLOWORLDSWING $MW1:HelloWorldSwing
COMPUTE $MW1:COMPUTE

You can use the SQL workbench, or sql proc statement to start a java class:

sql "HELLOWORLDSWING.EXEC","ud5"

If you are using Uniface 7.2.04 or higher, you can use the activate proc statement to start a java class:

activate "COMPUTE".ADD(1,2)
askmess "Result of 1+2=%%$status","ok"

For more information on the pre-defined 3GL routines available in MH3GLS.DLL, please refer to 3GL Routines in Proc Code. For more information on using the UD5+MW1 Driver please refer to UD5 Overview.

Getting Support

For all support and enquiry's please contact:

March Hare Software Limited
85 - 87 Bayham Street
Camden Town
London
NW1 0AG
United Kingdom

www.march-hare.com
support@march-hare.com

$Revision$ $Date$[go to top]