Instantiates a Java object and returns a handle of the runtime class. The Java runtime class can be released by using the JavaFreeObject function.
Java.bdh
JUnitLoadClass( in sClassSpecifier : string ): number;
| Parameter | Description |
|---|---|
| sClassSpecifier | Fully qualified name of the class to instantiate. The class must be available through the classpath. Use the
/ character as package separator.
For example: java/lang/String |
var
hTestClass : number;
dcltrans
transaction TInit
begin
// Load and start the JVM.
JavaCreateJavaVM();
// instantiate the java class
hTestClass := JUnitLoadClass("com/microfocus/Test");
end TInit;
transaction THello
begin
JUnitExecuteTest(hTestClass, "doHello", "doHello_timer");
end THello;
transaction TEnd
begin
JavaFreeObject(hTestClass);
end TEnd;