Programming Environment Setup


Select Your Operating System

Ubuntu Linux

Launch a terminal and run the following commands:

Change to your home folder.

$ cd $HOME

Install OpenJDK and ant.

$ sudo apt-get install openjdk-21-jdk ant

Create workspace folder.

$ mkdir workspace

Download and install IntelliJ (Community Edition).

To test your environment, download and unzip the base j-- and iota compilers under ~/workspace.

Launch IntelliJ, open ~/workspace/j--, and run the following commands in the IntelliJ terminal:

$ ant
$ chmod +x ./bin/j-- ./bin/javaccj-- ./bin/clemitter
$ ./bin/j-- tests/HelloWorld.java
$ java HelloWorld

Launch IntelliJ, open ~/workspace/iota, and run the following commands in the IntelliJ terminal:

$ ant
$ chmod +x ./bin/iota
$ ./bin/iota tests/Factorial.iota
$ python3 ./bin/marvin.py Factorial.marv

To setup a project JDK in IntelliJ, open the project, go to FileProject StructureProject SettingsProject, and from the SDK list select the OpenJDK you installed in a previous step.

Mac OS X

Launch a terminal and run the following commands:

Change to your home folder.

$ cd $HOME

Install brew.

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Install OpenJDK and ant.

$ brew install openjdk@21 ant

Set the environment variable JAVA_HOME.

$ echo "export JAVA_HOME=/opt/homebrew/opt/openjdk@21" >> $HOME/.zshenv

Create workspace folder.

$ mkdir workspace

Download and install IntelliJ (Community Edition).

To test your environment, download and unzip the base j-- and iota compilers under ~/workspace.

Launch IntelliJ, open ~/workspace/j--, and run the following commands in the IntelliJ terminal:

$ ant
$ chmod +x ./bin/j-- ./bin/javaccj-- ./bin/clemitter
$ ./bin/j-- tests/HelloWorld.java
$ java HelloWorld

Launch IntelliJ, open ~/workspace/iota, and run the following commands in the IntelliJ terminal:

$ ant
$ chmod +x ./bin/iota
$ ./bin/iota tests/Factorial.iota
$ python3 ./bin/marvin.py Factorial.marv

To setup a project JDK in IntelliJ, open the project, go to FileProject StructureProject SettingsProject, and from the SDK list select the OpenJDK you installed in a previous step.

Windows

Launch a powershell terminal and run the following commands:

Change to your home folder.

$ cd $HOME

Create workspace folder

$ mkdir workspace

Download and unzip OpenJDK 21 for Windows under some folder, say C:\jdk21. Run the following commands in a powershell terminal:

Set the environment variable JAVA_HOME.

$ setx JAVA_HOME "C:\jdk21"

Update the environment variable PATH to include the C:\jdk21\bin folder.

$ setx PATH "$env:PATH;C:\jdk21\bin"

Download and unzip Ant under some folder, say C:\ant. Run the following command in a powershell terminal:

Update the environment variable PATH to include the C:\ant\bin folder.

$ setx PATH "$env:PATH;C:\ant\bin"

Download and install IntelliJ (Community Edition). Launch IntelliJ, go to ConfigureSettingsToolsTerminal, and set Shell path to powershell.

Install Python 3, making sure you have checked the box that says Add Python 3.x to PATH.

To test your environment, download and unzip the base j-- and iota compilers under ~/workspace.

Launch IntelliJ, open ~/workspace/j--, and run the following commands in the IntelliJ terminal:

$ ant
$ ./bin/j-- tests/HelloWorld.java
$ java HelloWorld

Launch IntelliJ, open ~/workspace/iota, and run the following commands in the IntelliJ terminal:

$ ant
$ ./bin/iota tests/Factorial.iota
$ python.exe ./bin/marvin.py Factorial.marv

To setup a project JDK in IntelliJ, open the project, go to FileProject StructureProject SettingsProject, and from the SDK list select the OpenJDK you installed in a previous step.