Java Exception Handling Setup

Setup

Open your Terminal application and navigate to your ~/code/ga/lectures directory.

cd ~/code/ga/lectures

Clone the Java Exception Handling starter code repository with this command:

git clone https://git.generalassemb.ly/modular-curriculum-all-courses/java-exception-handling-starter.git java-exception-handling

💡 The java-exception-handling at the end of this command will place the contents of the java-exception-handling-starter repo into a directory named java-exception-handling.

Next, cd into the newly created directory:

cd java-exception-handling

You don’t want GA commits on your work, so remove the existing Git information from this starter code:

rm -rf .git

Open IntelliJ IDEA Community Edition and open the project by selecting the Open option on the launch screen.

Trust the project if you are prompted.

Navigate into the ./src/main/java/org.example directory and note the three files it contains:

The Main.java file has been stubbed up for you - take your lecture notes in this file like you typically would.

We’ll explore the other two files as we get further into the lesson; don’t worry about them for now.