Launch a terminal and run the following commands:
Change to your home folder.
$ cd $HOMEInstall
OpenJDK.$ sudo apt-get install openjdk-21-jdkCreate
libandworkspacefolders.$ mkdir lib workspaceDownload
stdlib.jarunder~/lib.$ wget https://www.cs.umb.edu/~siyer/teaching/stdlib.jar -P libDownload
dsa.jarunder~/lib.$ wget https://www.cs.umb.edu/~siyer/teaching/dsa.jar -P libSet the environment variable
CLASSPATH.$ echo "export CLASSPATH=.:./out:$HOME/lib/stdlib.jar:$HOME/lib/dsa.jar" >> $HOME/.bashrc
Download and install Visual Studio Code (aka VSCode).
Launch VSCode, click on the Extensions icon on the left sidebar, search for the Extension Pack for Java extension and install it.
To test your environment, download and unzip the
dsaj.zipunder~/workspace, launch VSCode, open the folder~/workspace/dsaj, and run the following commands in the VSCode terminal (can be launched by selecting Terminal → New Terminal):$ javac -d out src/HelloWorld.java$ java HelloWorld
Launch a terminal and run the following commands:
Change to your home folder.
$ cd $HOMEInstall
brew.$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Install
OpenJDKandwget.$ brew install openjdk@21 wgetCreate
libandworkspacefolders.$ mkdir lib workspaceDownload
stdlib.jarunder~/lib.$ wget https://www.cs.umb.edu/~siyer/teaching/stdlib.jar -P libDownload
dsa.jarunder~/lib.$ wget https://www.cs.umb.edu/~siyer/teaching/dsa.jar -P libSet the environment variable
CLASSPATH.$ echo "export CLASSPATH=.:./out:$HOME/lib/stdlib.jar:$HOME/lib/dsa.jar" >> $HOME/.zshenv
Download Visual Studio Code (aka VSCode), unzip the file, and move the extracted application into the Applications folder.
Launch VSCode, click on the Extensions icon on the left sidebar, search for the Extension Pack for Java extension and install it.
To test your environment, download and unzip the
dsaj.zipunder~/workspace, launch VSCode, open the folder~/workspace/dsaj, and run the following commands in the VSCode terminal (can be launched by selecting Terminal → New Terminal):$ javac -d out src/HelloWorld.java$ java HelloWorld
Launch a powershell terminal and run the following commands:
Change to your home folder.
$ cd $HOMECreate
libandworkspacefolders.$ mkdir lib,workspaceDownload
stdlib.jarunder~/lib.$ wget -O lib\stdlib.jar https://www.cs.umb.edu/~siyer/teaching/stdlib.jarDownload
dsa.jarunder~/lib.$ wget -O lib\dsa.jar https://www.cs.umb.edu/~siyer/teaching/dsa.jarSet 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
PATHto include theC:\jdk21\binfolder.$ setx PATH "$env:PATH;C:\jdk21\bin"
Download and install Visual Studio Code (aka VSCode).
Launch VSCode, click on the Extensions icon on the left sidebar, search for the Extension Pack for Java extension and install it.
To test your environment, download and unzip the
dsaj.zipunder~/workspace, launch VSCode, open the folder~/workspace/dsaj, and run the following commands in the VSCode terminal (can be launched by selecting Terminal → New Terminal):$ javac -d out src/HelloWorld.java$ java HelloWorld