Highlighted
Absent Member.
Absent Member.
936 views

Acucorp-gt interop Java via JNI

[Migrated content. Thread originally posted on 15 February 2011]

Good afternoon, I'm trying to make calls to the COBOL runtime (wrun32.dll) via Java JNI.
Currently, following the documentation provided, I load the library in my progam with the following code:

try
{
System.loadLibrary("wrun32");
}


The library is loaded whitout any problems and then I create this native methods acording microfocus documentation.


private native int AcuInitialize(Properties properties, String as[]);
public native void Shutdown(String prg);
public native int Call(String prg);
public native int Call50(String prg);
public native void Cancel(String prg);


Up here everything looks fine, but when I run this program calling AcuInitialice method, nothing happens, a Java error appears.

It looks like this...

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.gvsistemas.dataprovider.server.TesterJNI.AcuInitialize(Ljava/util/Properties; [Ljava/lang/String;)I


Well I hope that someone can help me, please!

Regards, Nahuel.
0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

RE: Acucorp-gt interop Java via JNI

Can you post the code you are using to call AcuInitialize?
Please include any code that is used to load the items used in the call.

Thanks,

Paul DuBois
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Acucorp-gt interop Java via JNI

There is a JavaCallingCobol.java example in the AcuGT\sample\java directory. I think you need to use the CVM class that we have made, versus just loading the runtime.

import com.acucorp.acucobolgt.*;
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.