Skip to main content

Problem:

You may have installed Server Express and are trying to have cobol and Java working together.

However, when you try to run one of the test programs you get the error:

Sorry unable to load libcobjvm_java2

Resolution:

If libcobjvm_java2 is on shared library PATH, then ensure 'libjava' and 'java' are found on the PATH/<Shared Library> PATH.

Check to see that COBJVM is set.

Below is an extract from the online manuals:

COBJVM

Specifies which Java Virtual Machine (JVM) to load.

Syntax:

COBJVM=platform_nnn

export COBJVM

Parameters:

platform_nnn  platform is a three-character code that indicates the platform on which you are running Server Express, for example:

ibm IBM AIX

unx SCO UnixWare

sun Sun SPARC

nnn indicates the version of the JVM, for example:

122 Version 1.2.2

130 Version 1.3.0

Comments:

You might need to set COBJVM if you are developing distributed applications with both COBOL and Java components. For further information see the section 'Setting up the COBOL and Java Environments' in the chapter 'Using Java and COBOL Together' in your Distributed Computing book.

Examples:

COBJVM=ibm_122

export COBJVM

Old KB# 2071