Skip to main content

Problem using RuntimeSystem

  • July 19, 2017
  • 2 replies
  • 0 views

Hello,

I am trying to execute a simple cobol program using 'com.microfocus.cobol.RuntimeSystem'.

public void exampleCall() throws Exception {

ParameterList pl = new ParameterList();
int result = RuntimeSystem.cobcall("simpCob", pl);
System.out.println("----------------------> " result) ;
}

Accessing RuntimeSystem , I get the following error (on windows):

java.lang.UnsatisfiedLinkError:
C:\\Program Files (x86)\\Micro Focus\\Net Express 5.1\\Base\\Bin\\CBLJVM_SUN.DLL: Can't load IA 32-bit .dll on a AMD 64-bit platform


Running the same on AIX I get:

Running de.lv1871.vvs.CobolRuntimeAdapterTest
Micro Focus COBOL Runtime Support for Java is preventing this application from
executing because an internal Java property is not setup.

Reason: Application should use "cobjrun" to execute this application instead
of the default "java" trigger

What does i have to set up ?

Many thanks in advance !

----------------------------------------------------------------------------

My dependencies are:

<dependency>
<groupId>de.lv1871.mfcobol</groupId>
<artifactId>mfcobol</artifactId>
<version>${cobol.runtime.lib}</version>
</dependency>
<dependency>
<groupId>de.lv1871.mfcobol</groupId>
<artifactId>mfcobolrts</artifactId>
<version>${cobol.runtime.lib}</version>
</dependency>
<dependency>
<groupId>de.lv1871.mfcobol</groupId>
<artifactId>mfsqljvm</artifactId>
<version>${cobol.runtime.lib}</version>
</dependency>

 

We are using NetExpress5 and VisualCobol (Windows RS 2008).


#VisualCOBOL
#RuntimeSystem

2 replies

Chris Glazier
Forum|alt.badge.img+2

Hello,

I am trying to execute a simple cobol program using 'com.microfocus.cobol.RuntimeSystem'.

public void exampleCall() throws Exception {

ParameterList pl = new ParameterList();
int result = RuntimeSystem.cobcall("simpCob", pl);
System.out.println("----------------------> " result) ;
}

Accessing RuntimeSystem , I get the following error (on windows):

java.lang.UnsatisfiedLinkError:
C:\\Program Files (x86)\\Micro Focus\\Net Express 5.1\\Base\\Bin\\CBLJVM_SUN.DLL: Can't load IA 32-bit .dll on a AMD 64-bit platform


Running the same on AIX I get:

Running de.lv1871.vvs.CobolRuntimeAdapterTest
Micro Focus COBOL Runtime Support for Java is preventing this application from
executing because an internal Java property is not setup.

Reason: Application should use "cobjrun" to execute this application instead
of the default "java" trigger

What does i have to set up ?

Many thanks in advance !

----------------------------------------------------------------------------

My dependencies are:

<dependency>
<groupId>de.lv1871.mfcobol</groupId>
<artifactId>mfcobol</artifactId>
<version>${cobol.runtime.lib}</version>
</dependency>
<dependency>
<groupId>de.lv1871.mfcobol</groupId>
<artifactId>mfcobolrts</artifactId>
<version>${cobol.runtime.lib}</version>
</dependency>
<dependency>
<groupId>de.lv1871.mfcobol</groupId>
<artifactId>mfsqljvm</artifactId>
<version>${cobol.runtime.lib}</version>
</dependency>

 

We are using NetExpress5 and VisualCobol (Windows RS 2008).


#VisualCOBOL
#RuntimeSystem

For the AIX issue the solution is in the error message. When executing COBOL from Java in a Unix environment you need to start the Java program using the COBOL cobjrun trigger program instead of java. cobjrun will load the required COBOL support and then start java automatically. Please see the documentation here.

For the Net Express issue on Windows this sounds like a problem with bitism. Is your COBOL application compiled as 32-bit or 64-bit? If it is compiled as 32-bit then you must use a 32-bit version of Java. If you are compiling COBOL as 64-bit then you must use a 64-bit version of Java.


Hello,

I am trying to execute a simple cobol program using 'com.microfocus.cobol.RuntimeSystem'.

public void exampleCall() throws Exception {

ParameterList pl = new ParameterList();
int result = RuntimeSystem.cobcall("simpCob", pl);
System.out.println("----------------------> " result) ;
}

Accessing RuntimeSystem , I get the following error (on windows):

java.lang.UnsatisfiedLinkError:
C:\\Program Files (x86)\\Micro Focus\\Net Express 5.1\\Base\\Bin\\CBLJVM_SUN.DLL: Can't load IA 32-bit .dll on a AMD 64-bit platform


Running the same on AIX I get:

Running de.lv1871.vvs.CobolRuntimeAdapterTest
Micro Focus COBOL Runtime Support for Java is preventing this application from
executing because an internal Java property is not setup.

Reason: Application should use "cobjrun" to execute this application instead
of the default "java" trigger

What does i have to set up ?

Many thanks in advance !

----------------------------------------------------------------------------

My dependencies are:

<dependency>
<groupId>de.lv1871.mfcobol</groupId>
<artifactId>mfcobol</artifactId>
<version>${cobol.runtime.lib}</version>
</dependency>
<dependency>
<groupId>de.lv1871.mfcobol</groupId>
<artifactId>mfcobolrts</artifactId>
<version>${cobol.runtime.lib}</version>
</dependency>
<dependency>
<groupId>de.lv1871.mfcobol</groupId>
<artifactId>mfsqljvm</artifactId>
<version>${cobol.runtime.lib}</version>
</dependency>

 

We are using NetExpress5 and VisualCobol (Windows RS 2008).


#VisualCOBOL
#RuntimeSystem
Thanks for your answer ! I set the system variabe the following:

SET PATH=C:\\Program Files (x86)\\Micro Focus\\Visual COBOL\\bin64;%PATH%