Launch a terminal and run the following commands:
Change to your home folder.
$ cd $HOME
Install
OpenJDK
.$ sudo apt-get install openjdk-21-jdk
Create
lib
andworkspace
folders.$ mkdir lib workspace
Download
stdlib.jar
under~/lib
.$ wget https://www.cs.umb.edu/~siyer/teaching/stdlib.jar -P lib
Download
dsa.jar
under~/lib
.$ wget https://www.cs.umb.edu/~siyer/teaching/dsa.jar -P lib
Set the environment variable
CLASSPATH
.$ echo "export CLASSPATH=.:./out:$HOME/lib/stdlib.jar:$HOME/lib/dsa.jar" >> $HOME/.bashrc
Download and install IntelliJ (Community Edition).
To test your environment, download and unzip the
dsaj.zip
under~/workspace
, launch IntelliJ, open the project~/workspace/dsaj
, and run the following commands in the IntelliJ terminal:$ javac -d out src/HelloWorld.java
$ java HelloWorld
To setup a project JDK in IntelliJ, open the project, go to
File > Project Structure > Project Settings > Project
, and from the SDK list select the OpenJDK you installed in a previous step.
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
andwget
.$ brew install openjdk@21 wget
Create
lib
andworkspace
folders.$ mkdir lib workspace
Download
stdlib.jar
under~/lib
.$ wget https://www.cs.umb.edu/~siyer/teaching/stdlib.jar -P lib
Download
dsa.jar
under~/lib
.$ wget https://www.cs.umb.edu/~siyer/teaching/dsa.jar -P lib
Set the environment variable
CLASSPATH
.$ echo "export CLASSPATH=.:./out:$HOME/lib/stdlib.jar:$HOME/lib/dsa.jar" >> $HOME/.zshenv
Download and install IntelliJ (Community Edition).
To test your environment, download and unzip the
dsaj.zip
under~/workspace
, launch IntelliJ, open the project~/workspace/dsaj
, and run the following commands in the IntelliJ terminal:$ javac -d out src/HelloWorld.java
$ java HelloWorld
To setup a project JDK in IntelliJ, open the project, go to
File > Project Structure > Project Settings > Project
, and from the SDK list select the OpenJDK you installed in a previous step.
Launch a powershell terminal and run the following commands:
Change to your home folder.
$ cd $HOME
Create
lib
andworkspace
folders.$ mkdir lib,workspace
Download
stdlib.jar
under~/lib
.$ wget -O lib\stdlib.jar https://www.cs.umb.edu/~siyer/teaching/stdlib.jar
Download
dsa.jar
under~/lib
.$ wget -O lib\dsa.jar https://www.cs.umb.edu/~siyer/teaching/dsa.jar
Set the environment variable
CLASSPATH
.$ setx CLASSPATH ".;.\out;$HOME\lib\stdlib.jar;$HOME\lib\dsa.jar"
Download and unzip OpenJDK 21 for Windows under some folder, say
C:\jdk21
. Run the following command in a powershell terminal:Update the environment variable
PATH
to include theC:\jdk21\bin
folder.$ setx PATH "$env:PATH;C:\jdk21\bin"
Download and install IntelliJ (Community Edition). Launch IntelliJ, go to Configure → Settings → Tools → Terminal, and set Shell path to
powershell
.
To test your environment, download and unzip the
dsaj.zip
under~/workspace
, launch IntelliJ, open the project~/workspace/dsaj
, and run the following commands in the IntelliJ terminal:$ javac -d out src/HelloWorld.java
$ java HelloWorld
To setup a project JDK in IntelliJ, open the project, go to
File > Project Structure > Project Settings > Project
, and from the SDK list select the OpenJDK you installed in a previous step.