-
Notifications
You must be signed in to change notification settings - Fork 35
Install opensource COBOL 4j v1.0.14
yutaro-sakamoto edited this page Nov 6, 2023
·
3 revisions
We have confirmed that opensource COBOL 4J v1.0.14 works on Ubuntu and AlmaLinux.
Run the following command.
sudo apt-get update
sudo apt-get install -y default-jdk build-essential bison flex gettext texinfo libgmp-dev autoconf
curl -L -o opensourcecobol4j-v1.0.14.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.0.14.tar.gz
tar zxvf opensourcecobol4j-v1.0.14.tar.gz
cd opensourcecobol4j-1.0.14
curl -L -o libcobj/sqlite-jdbc/sqlite.jar https://github.com/xerial/sqlite-jdbc/releases/download/3.36.0.3/sqlite-jdbc-3.36.0.3.jar
./configure --prefix=/usr/
make
sudo make install
Add /usr/lib/opensourcecobol4j/libcobj.jar
and /usr/lib/opensourcecobol4j/sqlite.jar
to the environment variable $CLASSPATH.
The docker container for opensource COBOL 4J is available.
docker pull opensourcecobol/opensourcecobol4j:1.0.14
Execute the following commands in order to run the "Hello World" COBOL program.
# Move to the sample directory
$ cd /root/cobol_sample
# Translate COBOL to Java and compile the Java source file.
$ cobj HELLO.cbl
# Run "Hello World"
$ java HELLO
HELLO WORLD!