Using a Mac for Java Programming

To setup your PC to program in Java, you will need these three things:

1. The Java Development Kit (JDK)

The JDK lets you develop and deploy Java applications on your Mac. It is automatically installed on your Mac the very first time you go to use it! Just click install when the Software Updater pops up and asks you. Update to install the JDK

You can check the version of JDK you have on your Mac by typing java -version on the command line. (see the next step)

2. Command Line Interface

To compile and run the Java programs with the JDK, you will need to use a Command Line Interface program. Your Mac already has such a program, its called the Terminal app. Look in the Utilities folder to find the Terminal app. Also pin it to the dock. For more information about the Terminal app and how to use it, visit the Terminal Mac Guide.

Using the Terminal app

One of the few difficulties with using the Terminal program is navagitating to a particular directory or folder. Terminal Here is a nifty little app to take care of that.

3. Text Editor

Only a simple text editor is needed to write your Java programs. You may use the built-in Mac editor called TextEdit, but a better choice is TextWrangler. TextWrangler has a few more features than the default TextEdit, including syntax highlighting, auto-indentation and line numbering. The program is free! Download TextWrangler.

Using Text Wrangler