Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
SystemAdmin
SystemAdmin
403 Posts
ACCEPTED ANSWER

Pinned topic Invoking Cobol from java

‏2013-01-21T14:03:33Z |
Hello I'm trying to invoke a cobol program from a java class.
Following suggestion in

Presentation material for 2006 Guide/SHARE Europe Nordic session S09
I wrote a Cobol OO wrapper to obtain:
java---> Cobol OO ---> COBOL
(I'm running cobol enterprise v4R2 and java 6.0.1)

But at runeime I get
java.lang.UnsatisfiedLinkError: c_to_cobol (Not found in java.library.path)
I'm not able to find c_to_cobol

any suggestion?

Thanks
Updated on 2013-01-22T14:58:20Z at 2013-01-22T14:58:20Z by brataj
  • brataj
    brataj
    40 Posts
    ACCEPTED ANSWER

    Re: Invoking Cobol from java

    ‏2013-01-21T21:39:27Z  in response to SystemAdmin
    Your description suggests that the Cobol OO part has either not been linked to an executable named libc_2_cobol.so, or the LIBPATH is not pointing to a directory that contains it.
    • brataj
      brataj
      40 Posts
      ACCEPTED ANSWER

      Re: Invoking Cobol from java

      ‏2013-01-21T21:39:33Z  in response to brataj
      Sorry, libc_to_cobol.so
      • SystemAdmin
        SystemAdmin
        403 Posts
        ACCEPTED ANSWER

        Re: Invoking Cobol from java

        ‏2013-01-22T13:49:31Z  in response to brataj
        Thanks, for reply, but the problem is that i cannot find libc_to_cobol.so.

        I did a serach on all my usr/lpp but I cannot find it.
        • brataj
          brataj
          40 Posts
          ACCEPTED ANSWER

          Re: Invoking Cobol from java

          ‏2013-01-22T14:58:20Z  in response to SystemAdmin
          My wording was a bit sloppy, I intended to to say "the Cobol OO part has not been linked as an executable named libc_to_cobol.so".

          But then I'm assuming that your illustration "java ---> Cobol OO ---> COBOL" is literally correct and you're calling Cobol code directly from Java as a native method, and there's no other (C?) code involved.

          In any case, there's no libc_to_cobol.so provided by the operating system, C or Cobol, perhaps it's creation is mentioned in the SHARE presentation.