Skip to content

Hagane COBOLCOBOL to Java compiler

Translate COBOL programs into Java programs and run them on the JVM.

Hello World ​

bash
# Translate HELLO.cbl into HELLO.java and compile it to HELLO.class
cobj HELLO.cbl

# Run it
java HELLO

See Usage for more.

Formerly opensource COBOL 4J ​

Hagane COBOL was formerly developed as a fork of opensource COBOL 4J. Version 1.0.0 is based on opensource COBOL 4J 2.1.0. The command names (cobj, cobj-idx, cobj-api), the runtime library libcobj.jar, and the install paths are unchanged. The Java package of libcobj, however, has changed from jp.osscons.opensourcecobol.libcobj to org.haganecobol.libcobj after 1.0.0, so Java generated by an earlier cobj must be translated again.

libcobj is released under the LGPL v3. Other parts are released under the GPL v3.