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.
- 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. - 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.- "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. - Installing the Java SDK (Microsoft's openJDK)
- 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.
- For installing on Windows
- 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 (typeY
), and then you'll get a list of possible OpenJDK versions to be installed. - I chose the most recent one, and ran the command
winget install Microsoft.OpenJDK.21
- 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.
- Launch the Command Prompt utility in Windows and run the command
- For installing on Apple macOS
- 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. - Once
brew
has been installed, open up a terminal and enterbrew install --cask microsoft-openjdk
Once the installation has completed, close the Terminal window, open up a new Terminal window, and enterjavac -version
which should now indicate that you have Java installed.
- 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
- 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.
C:\Users\rw> javac -version 'javac' is not recognized as an internal or external command, operatable program or batch file.
- "Do I already have the Java SDK (JDK) installed on my computer?"
If you have any questions, please don't hesitate to contact the instructor.