IntelliJ IDEA is an incredibly powerful, free and simple Java IDE. It handily beats other editors used to teach AP Computer Science, but it takes a little tinkering to strip it down for our uses. I’ve typed out the process below, but if you just want to download and be done with it, here’s a portable version with all of the settings tweaks.
Most school labs are locked down and prohibit software installation. This is a problem if you intend to run any IDE that isn’t already installed on the computer. Thankfully, the lab computer’s should already have a JVM installed, and it’s possible to store and run everything else that’s needed to build Java code from a flash drive.
Things that you’ll need for your portable IntelliJ installation: the latest JDK(make sure you get the right version for the computer you need to run it on), and the latest IntelliJ IDEA Community Edition release.
From a computer that will let run installers, install the IntelliJ application onto the flash drive. Make three new folders within the IntelliJ directory called
var. Install the JDK into the
jdk folder. Then install the JRE (a separate option during the JDK installation) into the
Now, open the
idea.propeties file from the
bin folder of the IntelliJ installation. Replace the first block of config settings that talk about directories with the following:
IntelliJ comes with a great kit of plugins to extend the base feature set, but most of them aren’t necessary for an introductory computer science course. So, under
Settings > Plugins, disable everything that isn’t GenerateToString, Inspection Gadgets, IntelliLang, Intention Power Pack, and Properties Support.
Other Settings Tweaks
Settings > Editor, check
Use soft wraps in editor and
Use soft wraps in console. This will make files with long single lines readable.
Settings > Editor > Appearance, check
Show line numbers. This will make deciphering errors a little easier. Also, uncheck
Show right margin to remove the confusing and arbitrary right margin line.
Settings > Appearance, check
Disable mnemonics in menu,
Disable mnemonics in controls to clear up some clutter, and check
Show vertical indents to make it easier to keep track of nested brackets. Finally, switch the theme to
Darcula to make coding easier on the eyes.
In the main IDE window, click the small dark box in the bottom left corner to hide some more UI cruft.
Better Syntax Highlighting Colors
While IntelliJ’s default syntax highlighting color set is decent, Solarized is much better. You can find preset files for IntelliJ on GitHub here (click on the XML files, right click the ‘Raw’ link above the text display and save the files). Change the file extensions to
icls and put them in
var > config > colors.
Here’s a download link for a nice, preconfigured, portable IntelliJ installation. It includes both 32 and 64 bit versions of the JRE and JDK. Delete the one you don’t need to save space. The
bin directory includes both 32 and 64 bit Intellij executables.
Eventually, you’ll need to get GridWorld running. Here’s how.