Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java call cobol routine?

Status
Not open for further replies.

yzy888yzy

Programmer
Mar 7, 2004
2
BE
Hello,

I would like to call Cobol routines (NETCOBOL) from a Java
application via the JNI.
Is it possible directly?
Do I need to use C++ code in between?
Does someone have some examples?
 
I would like to call Cobol routines (NETCOBOL) from a Java application via the JNI. Is it possible directly?

Yes. I assume you are using Windows. Compile your NetCobol into a DLL. JNI are designed to call Windows DLLs regardless of the language.

Do I need to use C++ code in between?

JNI is C++. If you can call your DLL with C++, so can JNI.

Does someone have some examples?

Since you appear fluent in C++, you can code a simple C++ routine to call your DLL.

Dimandja

 
Thanks!

As a matter of fact I am fluent in cobol(mainframe but now I try in windows) and Java, but not at all in C++, so I am glad to know it can work directly.
i will start to search seriously now i know it is possible.
[bigsmile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top