Data Structures and Algorithms in Java
GitHubAuthor
  • Preface
    • Syllabus
    • Schedule
  • 0. Getting Started
    • 0.1. Environment Setup
    • 0.2. Quiz
  • 1. Java Essentials
    • 1.1. Abstraction
    • 1.2. Implementation
    • 1.3. Unit Testing
    • 1.4. Quiz
  • 2. Priority Queues
    • 2.1. Simple Priority Queues
    • 2.2. Binary Heap
    • 2.3. Unit Testing
    • 2.4. Benchmarking
    • 2.5. Quiz
  • 3. Sorting Algorithms
    • 3.1. Abstraction
    • 3.2. Comparison-based Sort
    • 3.3. Divide & Conquer Sort
    • 3.4. Distribution-based Sort
    • 3.5. Quiz
    • 3.6. Homework
  • 4. Binary Search Trees
    • 4.1. Binary Search Trees
    • 4.2. Balanced BST
    • 4.2. AVL Trees
    • 4.3. Red-Black Trees
    • 4.4. Quiz
  • 5. Tries
    • 5.1. Concept
    • 5.2. Implementation
    • 5.3. Quiz
    • 5.4. Homework
  • 6. Disjoint Sets
    • 6.1. Concept
    • 6.2. Implementation
    • 6.3. Quiz
  • 7. Graphs
    • 7.1. Implementation
    • 7.2. Cycle Detection
    • 7.3. Topological Sorting
    • 7.4. Quiz
  • 8. Minimum Spanning Trees
    • 8.1. Abstraction
    • 8.2. Prim's Algorithm
    • 8.3. Kruskal’s Algorithm
    • 8.4. Edmonds' Algorithm
    • 8.5. Quiz
    • 8.6. Homework
  • 9. Network Flow
    • 9.1. Flow Network
    • 9.2. Ford-Fulkerson Algorithm
    • 9.3. Simplex Algorithm
    • 9.3. Quiz
  • 10. Dynamic Programming
    • 10.1. Fibonacci Sequence
    • 10.2. Tower of Hanoi
    • 10.3. Longest Common Subsequence
    • 10.4. Quiz
Powered by GitBook

©2023 Emory University - All rights reserved

On this page
  • Development Kit
  • Version Control
  • Integrated Development Environment
  • Project Management
  • GitHub Integration

Was this helpful?

Export as PDF
  1. 0. Getting Started

0.1. Environment Setup

Development kit, version control system, integrated development environment, and project management for Java programming.

Previous0. Getting StartedNext0.2. Quiz

Last updated 2 years ago

Was this helpful?

Development Kit

Install the latest version of the (JDK) on your local machine:

  • The required version: 17.x.x (or higher)

Although Java 17 is not the most recent version, it is the latest long-term support (LTS) release, which is preferred.

Version Control

Install Git using any of the following instructions:

Run the following commands on a terminal by replacing user.email and user.name with your email address and name:

git config --global user.email "your_id@emory.edu"
git config --global user.name "Your Name"

Integrated Development Environment

Install the latest version of on your local machine:

  • The recommended version: 2022.3.x (Ultimate Edition)

  • Apply for the with your school email address to use the ultimate version.

Project Management

  • Name: dsa-java

  • Location: local_path/dsa-java

  • Check "Create Git repository"

  • Language: Java

  • Build system: Gradle

  • JDK: 17

  • Gradle DSL: Groovy

  • Uncheck "Add sample code"

  • Advanced Settings:

    • GroupId: edu.emory.cs

    • ArtifactId: dsa-java

For JDK, you should be able to see version 17 if it is properly installed. If you cannot find the version, click [Add JDK] and select the following directory.

  • Windows: C:\Program Files\Java\jdk-17.x.x

  • Mac: /Library/Java/JavaVirtualMachines/jdk-17.x.x.jdk

distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-all.zip

Click [Settings - Build, Execution, Deployment] on the menu:

  • Click [Build Tools - Gradle] and set Gradle JVM to 17.

  • Click [Compiler - Java Compiler] and set Project bytecode version to 17.

Click [File - Project Structure] and select [Project Settings]:

  • Click [Project Settings - Project] and set SDK to 17 and Project language level to SDK default.

  • Click [Project Settings - Modules - Dependencies] and set Module SDK to 17.

  • Go to [Platform Settings - SDKs] and select 17.

compileJava {
    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17
}

Lastly, check mavenCentral() is configured as a repository in your build.gradle:

repositories {
    mavenCentral()
}

GitHub Integration

  • Choose [Version Control - Github] on the left pane.

  • Click [+] and login with your GitHub ID and password.

/.gradle/
/.idea/
/.vscode/
/build/

Click [Git - GitHub - Share Project on Github] and create a repository:

  • Make sure to check private.

  • Repository name: dsa-java

  • Remote: origin

  • Description: Data Structures and Algorithms in Java

Add all files and make the initial commit. Check if the repository is created under your GitHub account: https://github.com/your_id/dsa-java.

We recommend you create a GitHub account with your school email address, allowing you to add unlimited collaborators to the repository.

Even if you already have an IDE that you are familiar with for Java programming, we strongly recommend you use IntelliJ because provides IDEs for many popular programming languages with similar interfaces, which makes it easier for you to adapt.

Launch IntelliJ and create a project by clicking the [New Project] button at the top:

Open and make sure distributionUrl indicates the latest version of Gradle:

Open and make sure sourceCompatibility and targetCompatibility are set to java version 17 (add the following configurations if they do not exist already):

There is another popular build tool called . However, we will use Gradle for this course because it is faster and simpler to build a Java-based project.

To integrate the project with your repository, click [Settings]:

If you use two-factor authentication, log in with your .

Create under the project and add the following contents:

Java SE Development Kit
Git Installation Guide by Bitbucket
Git Installation Guide by GitHub
IntelliJ IDEA
academic license
JetBrains
Gradle
gradle/wrapper/gradle-wrapper.properties
build.gradle
Maven
GitHub
personal access token
.gitignore
Most-Used Java IDEs of 2021 -
Large Multi-project Build Times -
2021 Java Developer Productivity Report
Gradle vs Maven: Performance Comparison