AP CS Java Setup


Install a terminal

Download and install Git for Windows. This includes our console, git bash.

Use Terminal, which is included in MacOS.


Install your favorite text editor. VSCode, Sublime, and Atom are good.


Download Java SE Development Kit 8 for your operating system.

You will need to click the Accept License Agreement checkbox above the download links before anything will download. You may need to sign up for a free Oracle account.


Run the installer.


If you want to be able to run your text editor from the command line, like we do in class:

$ code .


Create a text file with the name of the command you want to use (code in this case, and always with no extension) with the following content (the second line is the path to your chosen text editor program):

"C:\Program Files (x86)\Microsoft VS Code\Code.exe" $1 &

Move the text file into the C:\Program Files\Git\usr\bin folder (or C:\Program Files (x86)\Git\usr\bin if that’s where Git was installed).

Restart Git Bash and your command should work.


With VScode open press the keys cmd + shift + p.

In the box that pops up, type shell.

Select the first option:
Shell Command: Install 'code' command in path
by pressing Enter or clicking it.

Press okay, then type in your user password.

Finally, close and reopen terminal.


Windows Only
Add java to your path.

Windows 10

Windows 7 or 8

To test if java is working, restart git bash and run:

$ javac

You should see info related to java, not a command not found error.