AP CS Java Setup
Install a terminal
Download and install Git for Windows. This includes our console,
Terminal, which is included in MacOS.
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):
#!/bin/sh "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).
Git Bash and your command should work.
With VScode open press the keys
cmd + shift + p.
In the box that pops up, type
Select the first option:
Shell Command: Install 'code' command in path
Enter or clicking it.
okay, then type in your user password.
Finally, close and reopen
Add java to your path.
Windows 7 or 8
To test if
java is working, restart git bash and run:
You should see info related to
java, not a
command not found error.