AP Computer Science A

Installing Java and BlueJ

Programming often requires a Software Development Kit (SDK) that provides a set of tools to help you write programs. The Java SDK, abbreviated "JDK," needs to be installed on your machine for this course, along with an Integrated Development Environment (IDE) that will give us even more tools. So, you need to make sure that both the JDK 8 and BlueJ IDE are installed on your computer.

  1. Installing the BlueJ IDE
    We'll be using an Integrated Development Environment for most of our year. Download and install BlueJ 5.5.0. for your machine/operating system.
  2. Installing the Java SDK
    Although BlueJ installs its own version of the JDK, we're going to download and install a separate copy as well, if you don't already have it installed on your computer.
    1. "Do I already have the Java SDK (JDK) installed on my computer?"
      If so, you won't need to proceed any further. You can determine whether or not the JDK is installed on your computer by opening up a Terminal (if using macOS or Linux), or a Command Prompt (if using Windows), and issuing this command:
      $ javac -version
      javac 24.0.2
      If any javac version number shows up—it doesn't need to be 24.0.2—you should be fine. If you get an error message (see Windows example below), you'll need to do the install as described next.
    2. C:\Users\rw> javac -version
      'javac' is not recognized as an internal or external command,
      operatable program or batch file.
    3. Installing the Java SDK (Microsoft's openJDK)
      1. Go to https://learn.microsoft.com/en-us/java/openjdk/install . You'll find instructions that you can follow for installing on any operating system.
      2. For installing on Windows
        1. Launch the Command Prompt utility in Windows and run the command
          winget search Microsoft.OpenJDK
          You'll need to agree to a Terms of Service (type Y), and then you'll get a list of possible OpenJDK versions to be installed.
        2. I chose the most recent one, and ran the command
          winget install Microsoft.OpenJDK.21
        3. Close the current Command Prompt window and open up a new one. Entering the command
          javac -version
          should now indicate that you have Java installed.
      3. For installing on Apple macOS
        1. Download and install the Brew utility by following links at https://brew.sh. The easiest way to do this is to follow instructions for installing the .pkg package of that utility.
        2. Once brew has been installed, open up a terminal and enter
          brew install --cask microsoft-openjdk
          Once the installation has completed, close the Terminal window, open up a new Terminal window, and enter
          javac -version
          which should now indicate that you have Java installed.

If you have any questions, please don't hesitate to contact the instructor.