Skip to main content

Our Situation:

We have a Cobol JVM for Eclipse project packaged as a jar file. We have another Cobol JVM for Eclipse project packaged as another jar file.  We currently have these deployed with no issues. We,however, now have to open up one of these to make a small code change.  The first jar uses a shared program in the second jar.  The method we have used is the "CALL 'programname' USING " syntax.  

The directives we are using on the jar when building are these:

IDXFORMAT"3"
SQL(DBMAN=JDBC TARGETDB=ORACLE BEHAVIOR=UNOPTIMIZED CLOSE_ON_COMMIT=NO NOCHECKSINGLETON DATE=EXTERNAL OPTIMIZECURSORS=NO)
ILUSING(packagename of called program)

our calling jar project compiles just fine but when i export it as a jar it fails on runtime with error 173 called program/file not found.

Both the called jar and calling jars exist in the same directory and this directory is added on the CLASSPATH.  what would i be missing here?

 

Our Situation:

We have a Cobol JVM for Eclipse project packaged as a jar file. We have another Cobol JVM for Eclipse project packaged as another jar file.  We currently have these deployed with no issues. We,however, now have to open up one of these to make a small code change.  The first jar uses a shared program in the second jar.  The method we have used is the "CALL 'programname' USING " syntax.  

The directives we are using on the jar when building are these:

IDXFORMAT"3"
SQL(DBMAN=JDBC TARGETDB=ORACLE BEHAVIOR=UNOPTIMIZED CLOSE_ON_COMMIT=NO NOCHECKSINGLETON DATE=EXTERNAL OPTIMIZECURSORS=NO)
ILUSING(packagename of called program)

our calling jar project compiles just fine but when i export it as a jar it fails on runtime with error 173 called program/file not found.

Both the called jar and calling jars exist in the same directory and this directory is added on the CLASSPATH.  what would i be missing here?

 

Hello Christopher,

Please try adding the full filespec for each of the .jar files to the CLASSPATH, rather than just specifying the directory that contains them.


Hello Christopher,

Please try adding the full filespec for each of the .jar files to the CLASSPATH, rather than just specifying the directory that contains them.

full filespec?  do you have a quick example


full filespec?  do you have a quick example

Assume that you have built myjar1.jar and myjar2.jar, and these have been placed in the directory c:\\apps\\jarfiles.

You might try adding the jar files to the CLASSPATH with:

set CLASSPATH=%CLASSPATH%;c:\\apps\\jarfiles\\myjar1.jar;c:\\apps\\jarfiles\\myjar1.jar

 


Assume that you have built myjar1.jar and myjar2.jar, and these have been placed in the directory c:\\apps\\jarfiles.

You might try adding the jar files to the CLASSPATH with:

set CLASSPATH=%CLASSPATH%;c:\\apps\\jarfiles\\myjar1.jar;c:\\apps\\jarfiles\\myjar1.jar

 

If the programs are in a package, then you might need todo a "mfjarprogmap -verbose -jar myjar1.jar"

This will update the .jar with a property file that allows the runtime to find a class in a package.

https://www.microfocus.com/documentation/visual-cobol/VC40/EclWin/GUID-3CF6A7CE-28F3-4111-8584-3A2B3D144B99.html