Skip to main content

I am attempting to compile a Cobol program to java byte code under Red Hat v7 using the following command.

cob64 -jt Cobol.cbl

I get the following error;

*1558-S
** Failed to start JVM
cob64: error(s) in compilation: Cobol.cbl

In my research the only advice i can find is to make sure the bit size matches (64 or 32). Hence the cob64 command

Cobol version info
version @(#)cob.c 5.0.0.52
PRN=KXCRH/AAD:Ao.U4.13.04
PTI=32/64 bit
PTI=Micro Focus Visual COBOL Development Hub 5.0
PTI=pkg_238079
PTI=MFInstaller

Java version info

java version "1.7.0_231"
OpenJDK Runtime Environment (rhel-2.6.19.2.el7_7-x86_64 u231-b01)
OpenJDK 64-Bit Server VM (build 24.231-b01, mixed mode)

My Environment (Edited for readability)

COBDIR=/opt/microfocus/VisualCOBOL
COBCPY=/opt/microfocus/VisualCOBOL/cpylib
LD_LIBRARY_PATH=/opt/microfocus/VisualCOBOL/lib:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64/lib:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64
LIBPATH=/opt/microfocus/VisualCOBOL/lib:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64/lib:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64
PATH=/opt/microfocus/VisualCOBOL/bin:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/ablinco/.local/bin:/home/ablinco/bin
JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64

I have attached  a stack trace of the compile.

Thanks in advance for any help

ps: I apologize if i have posted this in the wrong section

I am attempting to compile a Cobol program to java byte code under Red Hat v7 using the following command.

cob64 -jt Cobol.cbl

I get the following error;

*1558-S
** Failed to start JVM
cob64: error(s) in compilation: Cobol.cbl

In my research the only advice i can find is to make sure the bit size matches (64 or 32). Hence the cob64 command

Cobol version info
version @(#)cob.c 5.0.0.52
PRN=KXCRH/AAD:Ao.U4.13.04
PTI=32/64 bit
PTI=Micro Focus Visual COBOL Development Hub 5.0
PTI=pkg_238079
PTI=MFInstaller

Java version info

java version "1.7.0_231"
OpenJDK Runtime Environment (rhel-2.6.19.2.el7_7-x86_64 u231-b01)
OpenJDK 64-Bit Server VM (build 24.231-b01, mixed mode)

My Environment (Edited for readability)

COBDIR=/opt/microfocus/VisualCOBOL
COBCPY=/opt/microfocus/VisualCOBOL/cpylib
LD_LIBRARY_PATH=/opt/microfocus/VisualCOBOL/lib:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64/lib:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64
LIBPATH=/opt/microfocus/VisualCOBOL/lib:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64/lib:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64
PATH=/opt/microfocus/VisualCOBOL/bin:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/ablinco/.local/bin:/home/ablinco/bin
JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64

I have attached  a stack trace of the compile.

Thanks in advance for any help

ps: I apologize if i have posted this in the wrong section

Don't run cob64 explicitly. Set the COBMODE environment variable:

export COBMODE=64
cob -jt Cobol.cbl

Setting COBMODE will ensure you run the 64-bit versions of all the tools, use the 64-bit runtime objects, etc.


I am attempting to compile a Cobol program to java byte code under Red Hat v7 using the following command.

cob64 -jt Cobol.cbl

I get the following error;

*1558-S
** Failed to start JVM
cob64: error(s) in compilation: Cobol.cbl

In my research the only advice i can find is to make sure the bit size matches (64 or 32). Hence the cob64 command

Cobol version info
version @(#)cob.c 5.0.0.52
PRN=KXCRH/AAD:Ao.U4.13.04
PTI=32/64 bit
PTI=Micro Focus Visual COBOL Development Hub 5.0
PTI=pkg_238079
PTI=MFInstaller

Java version info

java version "1.7.0_231"
OpenJDK Runtime Environment (rhel-2.6.19.2.el7_7-x86_64 u231-b01)
OpenJDK 64-Bit Server VM (build 24.231-b01, mixed mode)

My Environment (Edited for readability)

COBDIR=/opt/microfocus/VisualCOBOL
COBCPY=/opt/microfocus/VisualCOBOL/cpylib
LD_LIBRARY_PATH=/opt/microfocus/VisualCOBOL/lib:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64/lib:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64
LIBPATH=/opt/microfocus/VisualCOBOL/lib:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64/lib:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64
PATH=/opt/microfocus/VisualCOBOL/bin:/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/ablinco/.local/bin:/home/ablinco/bin
JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.231-2.6.19.2.el7_7.x86_64

I have attached  a stack trace of the compile.

Thanks in advance for any help

ps: I apologize if i have posted this in the wrong section

Have you tried using 1.8 rather than 1.7?

As I am not sure 1.7 is supported in 5.0.


Have you tried using 1.8 rather than 1.7?

As I am not sure 1.7 is supported in 5.0.

Thank you. I will give that a try