Problem 0
Installing the JDK
First, you need the Java Development Kit (JDK) from Oracle. This is the actual compiler that your development environment (IDE) uses behind the scenes. Even if you already have Java installed, you probably still need this. (Most people only have the Java Runtime Environment (JRE) installed, which allows you to run existing Java programs but not compile new ones.)
Windows
Direct your web browser to http://www.oracle.com/technetwork/java/javase/downloads/
Click the big "Java Download" button.
Once downloaded, run the executable. Follow the prompts to install the JDK. You'll need administrator access.
Important!!
Next, you'll need to set an environment variable so that the command prompt can find the java compiler. You can find instructions for editing the PATH here.
Once you've added Java's bin folder to the PATH environment variable, you can try the Compiler Check assignment to make sure you've done it right.
Mac OS X
Good news! The JDK is usually installed by default on Macs, so just open up "Terminal" and try the Compiler Check assignment to make sure.
Linux
On Debian-based distros (such as Ubuntu), you should be able to open up a terminal and install the JDK like so:
$ sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get update $ sudo apt-get install oracle-java8-installer
Then, just try the Compiler Check assignment to make sure everything worked.
An Integrated Development Environment (IDE)
Although you can create Java programs in any text editor and compile/run them from the command-line, most students are more comfortable with an Integrated Development Environment that handles these things for them.
I recommend you use IntelliJ IDEA. You can get the Ultimate version by applying for an education license. Otherwise you can use the “community” version.
1.1: Compiler Check ►
Adapted from ProgrammingByDoing.com
©2013 Graham Mitchell
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 United States License.