-
Notifications
You must be signed in to change notification settings - Fork 38
opensource COBOL 4J v1.0.17のインストール
yutaro-sakamoto edited this page Nov 30, 2023
·
2 revisions
opensource COBOL 4J v1.0.17はUbuntuとAlmaLinuxで動作を確認しています.
下記のコマンドを実行する
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.17.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.0.17.tar.gz
tar zxvf opensourcecobol4j-v1.0.17.tar.gz
cd opensourcecobol4j-1.0.17
./configure --prefix=/usr/
make
sudo make install
/usr/lib/opensourcecobol4j/libcobj.jar を 環境変数$CLASSPATH に追加する.
opensource COBOL 4J v1.0.17をインストールしたDockerイメージを利用できます.
docker pull opensourcecobol/opensourcecobol4j:1.0.17
コンテナ内で下記のコマンドを実行すると、Hello Worldプログラムをコンパイル&実行できる。
# 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!