Skip to content

Choosing a Java AP CS (CS1) IDE

2010 August 8
by Hélène Martin

Inevitably, teaching programming requires a choice of language and then of development environment (IDE).  Although I tend to think that good courses can be taught in a wide array of languages and IDEs, it’s clear that some will make teaching and learning easier than others.  I’ll even go as far as to say that I believe a teacher can improve his/her effectiveness simply by taking the time to deliberately decide what’s important in an IDE and then choosing between different options based on his/her criteria.  In my Java-based courses, I like to use jGRASP and eventually introduce Eclipse.  My criteria for selection:

  1. Has a small learning curve
  2. Does not hide anything major from students (main method as program entry point, for example)
  3. Offers basic debugging support (establishing breakpoints, seeing variable values)
  4. Allows students to easily transfer source files between computers
  5. Runs on any operating system students are likely to have at home

There are several things others may be interested in that are NOT criteria for me:

  1. Is a “professional” environment (each company has its idiosyncratic setup, I don’t care to teach apps and I trust students can learn on their own)
  2. Provides code completion
  3. Provides code/algorithm visualization
  4. Allows for easy applet creation

I’ll start by briefly discussing the two IDEs I prefer and then give some of my insights into others I have thought about.  I’m very interested in what others would have to say on this matter.


jGRASP ArrayList visualization

jGRASP ArrayList visualization

I start my students out with jGRASP and I recommend it without reservations.  The interface is very simple and students really only need to learn two buttons: compile a program (a green plus) and run it (a running red figure).  jGRASP doesn’t attempt to do any file management and doesn’t require programs to be contained in a project, though that is an option.  This means that nothing is hidden from students and that they can manage their Java files as they would any other.  Furthermore, it runs anywhere Java runs, so students can work from home in a familiar environment.

The debugger is very simple to use: breakpoints are dropped by clicking in the margin of a particular line and a ladybug icon starts the debugger.  An arrow allows for stepping through as the lines being run are highlighted.  All variables are shown with their values in a side bar, as is the call stack.

I tend to use a lot of hand drawings and ask my students to hand-draw code visualizations when debugging but I can imagine many teachers getting excited about jGRASP’s object visualization capabilities.  I haven’t used this much but there’s a nice tutorial on viewers on the jGRASP site.

jGRASP is not used in industry, but I don’t think that really matters.  Everything a student learns using jGRASP will transfer to a more powerful IDE.  There’s no code completion, but I consider that a feature — I don’t want my students relying on it early.

I show my students a slightly modified tutorial written by Marty Stepp early in the semester.  Using the AP CS Gridworld case study with jGRASP is trivial and I show my students a couple of screenshots to help them get them going.

jGRASP is the tool I reach for when I want to write a quick bit of Java for a personal project, a proof of concept or something like that.


I introduce Eclipse when we get to multi-class projects.  At that point, managing files in jGRASP is getting a little annoying and students know enough different classes that they’re having trouble remembering relevant fields and methods.  They’re really impressed by code completion and can see the power of a full-blown IDE complete with plugins, version control support, etc.

The truth, though, is that Eclipse is unnecessarily unwieldy for small projects with a handful of classes.  Its file management process is confusing and students often end up with duplicate files and have a hard time with version control.  It works much better with a formal version control system like SVN or Mercurial but I’m not interested in taking time out of programming to teach tools in CS1.  In practice, a lot of students try Eclipse, think it’s pretty cool, and then come back to jGRASP because it’s just friendlier.  I think that’s ok.

Eclipse is the tool I reach for when I want to work on a larger project whether it’s in Ruby on Rails or for the Android mobile platform.


If I weren’t using jGRASP, I’d be using DrJava.  It’s one step simpler than jGRASP and doesn’t include visualizations.  I don’t use those much in jGRASP anyway but I just find the jGRASP interface a little more comfortable.  It’s really a matter of taste as I think both fulfill my criteria.



BlueJ class relationship visualization.

BlueJ is designed specifically for teaching Java object oriented programming and I teach objects late so it really would make no sense for me.  It’s hard for me to really evaluate the IDE since I disagree with its fundamental premise: that objects are the place to start when teaching Java.  I think, though, that it’s likely the best option for a teacher who has chosen that particular approach.  Students can start creating classes and instantiating objects without having to worry about writing a main method or understanding what objects really are.  The idea is that they can experiment and develop mental models that way.

As seen in the screenshot, each class is represented by a tan box and class relationships are represented by arrows, making a UML-like diagram.   I do think it’s very useful for students to see the relationships between their classes.  Static methods can be called by right-clicking on one of the classes.  Objects are also instantiated in the same way and they can be seen as red boxes at the bottom of the window.  Right clicking on an object allows instance methods to be executed.

Supporters of the IDE and related methodology claim that the visualizations really help students learn OOP.  A recent paper by Bennedsen and Schulte (BlueJ Visual Debugger for Learning the Execution of Object-Oriented Programs?) found that students learned just as well with manual tracing of code.


I’ve used NetBeans for Java mobile development and I was fairly neutral about the experience.  Like Eclipse, it’s high-powered and full-featured.  I don’t think it suffers as badly from file management weirdness but it doesn’t have as many plugins for it.  People who like NetBeans really like NetBeans.  Again, though, I think that presenting a professional IDE gives too many opportunities for students to get lost exploring features instead of learning to program.

Command line

A lot of instructors seem to use the command line tools (javac, java) for building and running programs students write in something like Notepad.  I love the command line for my own use but I think it’s too hack-y for most students.  I want to make sure they have access to syntax highlighting, bracket pairing, etc, and at that point, why not add a compile button?  I would stay away from command line tools primarily because I suspect they intimidate students who are not comfortable with computers and give students who are already confident something to brag about (“let me show you this command I know…).  That takes away from problem-solving.  For someone who insists on this method, I highly recommend Notepad++, a Windows text editor.

From a purely practical standpoint, many K-12 labs restrict access to the command line.

7 Responses leave one →
  1. Alvin Kroon permalink
    August 8, 2010

    In our AP Java classes at Kamiak HS, we work with three IDEs: jGRASP, BlueJ and NetBeans.

    I wholeheartedly agree with the jGRASP comments above. It is an excellent IDE. It’s a bit cumbersome when one wants to use Projects.

    When we get to Classes and Projects, BlueJ has a very intuitive projects-friendly IDE. BlueJ also provides excellent tutorials to help introduce the concepts of classes. One of its big advantages is the ability to “run” a class without a Main. It makes debugging non-main classes very easy. The ability to create an instance of a class and see what it does is very handy.

    We use NetBeans for its Form generator. It’s very similar to Visual Basic and automatically generates pages of tedious windows code.

    We no longer use Eclipse because of the huge overhead it creates with every project. Try to remove Eclipse from your system — good luck. If and when my students start writing Java in a commercial programming environment Eclipse is a wonderful IDE.

    • Hélène Martin permalink*
      August 8, 2010

      Thanks for your insights, Alvin! I didn’t realize you used both jGRASP and BlueJ. Not a bad idea…

  2. August 8, 2010

    As an alternative to Eclipse, I would suggest IntelliJ. It’s not missing any features a high school or even college student would miss, but it’s much lighter than Eclipse in terms of footprint and management.

    I think its autocomplete is actually even a little better and friendlier to beginner programmers; Eclipse’s requires an object to be specified before it’ll give it to you, whereas IntellJ will suggest things as soon as it can, much like Visual Studio does with .NET CLR languages.

    Everyone where I work has migrated from either Eclipse or NetBeans over to a unanimous IntelliJ (apart from holdouts like me still using Vi).

    • Hélène Martin permalink*
      August 8, 2010

      Interesting — I didn’t realize IntelliJ was taking over.

      I just played with it a little and it’s not lightweight enough that I would use it as a first IDE. That said, I’ll explore it as an alternative to Eclipse — thanks!

      (If I were teaching a class of me-clones, we’d use emacs and javac but… I’m trying for a broader audience and certainly wouldn’t want to get into flame wars with you vi-types. =))

  3. yaw anokwa permalink
    August 8, 2010

    @alvin i’ve found eclipse (os x and windows) trivial to uninstall. just drag the folder to the trash.

    @clint as eclipse has become more cocoa-y and less java-y, i’ve started to like it more. i’m shallow like that.

  4. September 12, 2010

    I like and use JCreator (the LE version is free) — no code completion, no auto-formatting, no visualizations. But it’s Windows-only, which means I need to run it in emulation at home and that sucks.

  5. October 20, 2010

    From France, Thanks ^^

    I was looking for a free and easy tool for analyzing and visualizing codes dependencies (like microsoft visual studio 2010 visualization and modeling pack)

    after reading your article ;
    jGRASP seems to be the best tool to learn or understand easily a langage or a complex system (with Eclipse).

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS