---
title: "Jam 00 - Exercise 2 - Development Environment Setup and Installation"
tags:
- 4 🥳 done
- jam00
- setup
- tools
- installation
---
<!-- markdownlint-disable line-length single-h1 no-inline-html -->
<!-- markdownlint-configure-file { "ul-indent": { "indent": 4 }, "link-fragments": {"ignore_case": true} } -->
# Exercise 2 - Development Environment Setup and Installation
{%hackmd dJZ5TulxSDKme-3fSY4Lbw %}
## Required Steps - JetBrains Student License
Before we begin setting up your development environment, you'll need to activate your free student license for IntelliJ IDEA:
1. Visit [JetBrains Student License](https://www.jetbrains.com/student/)
2. Click "Apply Now" under the "For students and teachers" license section
3. Fill out the form using your @bucknell.edu email address
4. Follow the verification steps in your email
:::warning
⚠️ **Important Notes**
- You must use your Bucknell email address
- The license is free but must be renewed annually
- Ultimate edition is required for this course (not Community edition)
:::
## Choose Your Path
Before continuing with the rest of the setup, you need to make an important decision about how you'll complete your coursework this semester. You have two options:
🔄 **Option 1: Use Bucknell Linux**
- **Pros**:
- No software installation needed
- Consistent environment
- Works on any computer with web access
- **Cons**:
- Requires internet connection
- Less convenient for working remotely
- Limited to lab hours or remote access
💻 **Option 2: Install on Your Personal Computer**
- **Pros**:
- Work anywhere, anytime
- No internet dependency
- More convenient for most students
- **Cons**:
- You must manage your own installations
- You must solve your own technical issues
- Requires comfort with software installation
:::danger
🚨 **Important Note for Personal Installations**
If you choose to install software on your own computer:
- You are responsible for all installation and configuration
- Technical issues with your laptop are not valid excuses for late work
- The instructor and TAs cannot troubleshoot your personal computer
Most students successfully choose this option, but you must be comfortable managing your own system.
> **Be warned:** Problems related to your choice to use your own laptop, including connectivity problems, will not be an acceptable excuse for late work!
:::
## Considerations
1. **Technical Comfort**: Are you comfortable installing and configuring software?
2. **Work Style**: Do you prefer working in labs or anywhere?
3. **Internet Access**: Do you have reliable internet at home? Do you want to have to use the VPN to do any work? (Note: You will have to use the VPN at home to submit your work regardless of your choice)
4. **Computer Type**: Is your laptop capable of running development tools?
:::success
✅ **Make Your Choice**
After reviewing the options above:
1. Decide which path you'll take
2. Continue to the appropriate section below:
- [Using Bucknell Linux](#Choice-1---Use-Bucknells-Linux-System)
- [Installing on Your Computer](#Choice-2---Install-Software-on-Your-Own-Laptop)
:::
## Choice 1 - Use Bucknell's Linux System
There are appealing aspects to this choice. You don't need to install software, and you don't need to bring your own laptop to class since you can just log into any of the Linux lab computers. You can also use your own laptop and easily run a remote graphical session from your own computer.
1. Log into your Linux account. Open a terminal window.
2. Run IntelliJ by typing `idea` at the shell prompt.
- We'll cover IntelliJ setup in more detail later
- Exit IntelliJ after verifying it launches
3. Configure your environment by modifying your startup script. Type the following command to open the `.bashrc` file in VSCode:
```bash
code ~/.bashrc
```
4. Add these lines to the bottom of your `.bashrc` file:
```bash
module load java/21
module load gradle
```
5. Save your file and exit VSCode.
6. Log out of Linux and log back in to apply changes.
:::success
✅ **Quick Setup Complete!**
You can now skip to [**Confirm Your Installation**](#Confirm-Your-Installation) below.
:::
## Choice 2 - Install Software on Your Own Laptop
:::danger
🚨 **Important Reminder**
- You are responsible for all installation and configuration
- Technical issues with your laptop are not valid excuses for late work
- The instructor and TAs cannot troubleshoot your personal computer
Most students successfully complete this installation, but you must be comfortable managing your own system.
:::
### Package Managers: The Professional Way to Install
Package managers streamline software installation and maintenance by:
- Automating downloads and updates
- Managing dependencies
- Ensuring consistent installations
Package managers are powerful tools that simplify software installation and management on your computer. They automate the process of downloading software from online repositories, making it quick and easy to install, update, and manage applications. Package managers also handle dependency resolution, ensuring that all required components are present and compatible. Throughout this course, we will utilize package managers to consistently and efficiently set up and maintain your development environment.
- **MacOS**: Install Homebrew
(Install instructions below: More information available at [Homebrew](https://brew.sh) )
```bash= !
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
After you run this command, `brew` is not completely installed yet. You need to tell your terminal how to find the executable. `brew` will prompt you with the exact commands to run. Copy and paste what `brew` provides you. It will look something like this but filled in with your username and shell:
```bash=
echo >> /Users/**username**/.**shell**profile
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/**username**/.**shell**
eval "$(/opt/homebrew/bin/brew shellenv)"
```
- **Windows**:
- Install Chocolatey
(Install instructions below: More information available at [Chocolatey](https://chocolatey.org/install) )
- Run PowerShell **as Administrator** and execute:
```powershell= !
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
```
- To run PowerShell **as Administrator**
1. Press the Windows key and type "PowerShell"
2. `Right-click` on "Windows PowerShell" in the search results. You may see multiple PowerShells in the search. `Right-click` the one that says "Windows PowerShell"
3. Select "Run **as administrator**" from the context menu
4. Click "Yes" if prompted by User Account Control
5. In the PowerShell window that opens, execute:
### Installing Required Software
🖥️ **Important**: When running these commands:
- Read each prompt carefully before responding
- Watch for prompts asking about script execution. Choclatey will prompt **Do you want to run the script?([Y]es/[A]ll - yes to all/[N]o/[P]rint)**
- **Answer A for All**
- Enter your password when requested (you won't see it as you type)
- Wait for each command to finish before running the next one
:::info
- **MacOS Users**: Use Terminal
- **Windows Users**: Use PowerShell as Administrator
:::
1. **IntelliJ**:
- MacOS: `brew install --cask intellij-idea`
- Windows: `choco install intellijidea-ultimate`
2. **Java 21 JDK**:
- MacOS: Enter the commands seperately
```bash
brew install openjdk@21
```
```bash
sudo ln -sfn /opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-21.jdk
```
- The next step will will depend on your shell. You can find the export line in the homebrew output. Look for "If you need to have openjdk@21 first in your PATH, run:". It's several lines back in the output.
- Windows: `choco install openjdk --version=21.0.2`
3. **Git**:
- MacOS: `brew install git`
- Windows: `choco install git`
4. **Gradle**:
- MacOS: `brew install gradle`
- Windows: `choco install gradle`
:::info
🔧 **Windows 10 (or later) Users Only: Your Terminal Setup**
Installing Git on Windows provides you with **Git Bash**, which will be your terminal for this course. It provides:
- A Linux-like shell environment
- Common Linux commands
- Git integration

When we say "open your terminal", Windows users should always open Git Bash, not Command Prompt or PowerShell.
**Advanced Option**: Consider installing Windows Subsystem for Linux (WSL2) for a full Linux experience on Windows. While not required for this course, it's beneficial for CS majors. Search online for WSL2 setup guides if interested. **Again, you are on your own if you do this.**
:::
## Confirm Your Installation
Let's verify your development environment is ready. Open a new terminal and we'll check each tool's installation. You'll run version check commands that should display output similar to what's shown below. While your exact versions may differ, they should be relatively recent:
:::warning
🔧 **Troubleshooting Tip**: If commands aren't found after installation, try:
1. Close your current terminal
2. Open a new terminal
3. Try the commands again
This process is called "sourcing" your terminal environment. When you start a new terminal, it automatically loads the updated configuration files (like `.bashrc` or `.bash_profile`), which contain the paths and settings for the newly installed tools. Sourcing ensures your terminal recognizes the new commands and configurations.
:::
<!-- SEMESTER SPECIFIC: Update version each semester -->
1. **Java**:
```bash
$ java -version
openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment (build 21.0.2+13-LTS)
OpenJDK 64-Bit Server VM (build 21.0.2+13, mixed mode, sharing)
```
2. **Git**:
```bash
$ git --version
git version 2.48.1
```
3. **Gradle**:
```bash
$ gradle -v
------------------------------------------------------------
Gradle 8.7
------------------------------------------------------------
Build time: 2024-03-22 15:52:46 UTC
Revision: 650af14d7653aa949fce5e886e685efc9cf97c10
Kotlin: 1.9.22
Groovy: 3.0.17
Ant: Apache Ant(TM) version 1.10.13 compiled on January 4 2023
JVM: 21.0.2 (Eclipse Adoptium 21.0.2+13-LTS)
OS: Linux 5.14.0-427.20.1.el9_4.x86_64 amd64
```
If each of the above works from the command line, you are good to go!