Java & IntelliJ Setup Skip to main content Toggle navigation CIS 121 - Data Structures and Algorithms CIS 121 Lectures Recitations Homework Homework Materials Java Style Guide Testing Guide Gradescope Help Written HW Guidelines Exams Staff Calendar Resources NOTE: You are free to use whatever development environment you want, but CIS 121’s supported IDE is IntelliJ. Java & IntelliJ Setup Instructions for Mac Mac users can use a helpful tool called Homebrew to install both Java and IntelliJ. First, open Terminal and install Homebrew if you have not yet: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Then, install Java and IntelliJ in this one command: brew install --cask intellij-idea-ce adoptopenjdk/openjdk/adoptopenjdk8
Note: The above command installs IntelliJ Community Edition, which is free and open source. The Community Edition has all the needed features (and more) for CIS 121. That said, if you would like to install IntelliJ Ultimate, just replace intellij-idea-ce with intellij-idea. You can use Ultimate for free using their free 30-day trial; to continue using it, you can sign up for a free student license using this form. Instructions for Windows Step 1: Install Java 8 To run IntelliJ, a Java Runtime Environment (JRE) must be installed. You can verify that you have the JDK 8 installed by running the java -version command (from the Command prompt in Windows or the terminal on Mac): $ java -version
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
You should see output similar to lines 2-4 above. Any higher version of Java 8 will also work for this class. If you do not have the JDK 8 installed, you can download it from this site. Select the version for your OS from the table titled “Java SE Development Kit 8u311” (or whatever odd number it’s currently at). For example, the download file for 64-bit machines (which your machine is, most likely) will be titled jdk-8u311-windows-x64.exe. Note that you will need to accept the terms & conditions and may need to create a free Oracle account to complete the download. Note: It is best to do this step before installing IntelliJ. Step 2: Install IntelliJ We recommend using the latest version of IntelliJ. Make sure you have completed Step 1 before installing IntelliJ. Visit the IntelliJ installer page Click on the link for your platform on the right side of the screen (under “Download”) and unzip the downloaded file to extract the Installer. See the above note for differences between the Community and Ultimate editions. Run the IntelliJ Installer to install IntelliJ. Launch IntelliJ. Importing and Creating a Java Project in IntelliJ CIS 121 provides you with stub files for each programming assignment. To import and create a project from these stub files: Download and unzip the stub files Launch IntelliJ → Open → Select the unzipped stub files Select Java Settings: File → Project Structure → Project → Set SDK to 1.8 and Language Level to 8 - Lambdas, type annotations, etc. Add JUnit 4 (You MUST use JUnit 4): File → Project Structure → Libraries → + (should say “New Project Library” on hover) → From Maven → junit:junit:4.13.1 That’s it! Note that some homeworks may have more steps for setup; these steps are specified in the homework-specific writeups. Other than that, happy coding! :) Last updated on Sun, Feb 20 at 04:37 PM.