DrJava Papers

The JavaPLT group has published several papers on DrJava, which are listed below.


DrJava: A lightweight pedagogic environment for Java

Eric Allen, Robert Cartwright, and Brian Stoler
September 7, 2001
Presented at SIGCSE 2002

Abstract: DrJava is a pedagogic programming environment for Java that enables students to focus on designing programs, rather than learning how to use the environment. The environment provides a simple interface based on a "read-eval-print loop" that enables a programmer to develop, test, and debug Java programs in an interactive, incremental fashion. This paper gives an overview of DrJava including its pedagogic rationale, functionality, and implementation.

View full paper as: (.html) (.ps) (.pdf)


A Framework for Building Pedagogic Java Programming Environments

Brian Stoler
Masters Thesis
April 2002

Abstract: Java has become the dominant language for teaching introductory computer science at both the high school and college levels. Yet Java's development tools and syntax often distract beginning students from the programming concepts being taught. To combat this problem, we have implemented DrJava, a pedagogic programming environment, and devised a sequence of language levels for Java, which partition the language into pieces that can be more easily taught at one time.
DrJava is a lightweight, yet powerful, Java development environment suitable both for beginners and more advanced developers. The environment provides a simple interface based on a "read-eval-print loop" that enables a programmer to develop, test, and debug Java programs interactively and incrementally. DrJava is freely available under an open source license.
This thesis describes DrJava and an implementation framework and conceptual design for language levels in Java.

View full paper as: (.pdf)


Production Programming in the Classroom

Eric Allen, Robert Cartwright, and Charles Reis
September 6, 2002
Presented at SIGCSE 2003

Abstract: Students in programming courses generally write "toy" programs, even when the size of the assigned projects is large. Programming assignments are written, superficially tested, graded, and then discarded. This approach to programming pedagogy leaves students unprepared for production programming in the workplace because the gap between writing toy programs and developing reliable software projects is enormous.
This paper describes how production programming can be effectively taught to undergraduate students in the classroom. The key to teaching such a course is using Extreme Programming methodology to develop a sustainable open source project with real customers, including the students themselves. Extreme Programming and open source project management are facilitated by a growing collection of free tools such as the JUnit testing framework, the Ant scripting tool, and the SourceForge website for managing open source projects.

View full paper as: (.pdf)


A Pedagogic Programming Environment for Java that Scales to Production Programming

Charles Reis
Masters Thesis
April 2003

Abstract: This thesis describes extensions to the DrJava development environment that make it suitable for production programming. DrJava is an effective tool for teaching introductory programming skills in Java, and its simplicity is a desirable characteristic for projects of any size. To better support the development of large projects in DrJava, a carefully selected suite of features has been added to the environment. To facilitate interoperation with professional development environments, a plug-in supporting the DrJava interface has been written for the Eclipse environment. As a result of this work, DrJava has become an appropriate tool for teaching production programming skills in an academic environment, without sacrificing its original goals.

View full paper as: (.pdf)


Taming a Professional IDE for the Classroom

Charles Reis and Robert Cartwright
September, 2003
Presented at SIGCSE 2004

Abstract: An important question that must be addressed in a coherent computing curriculum is which programming environments to use across the curriculum. For Java, currently the most widely used language in computing education, a wide variety of professional integrated development environments (IDEs) are available--including the increasingly popular, open-source Eclipse environment. Professional IDEs for Java work well in advanced courses, but they are poorly matched to introductory courses because they deluge beginning students with a complex array of features. In addition, professional IDEs fail to shield students from distracting complications like the Java command line interface and Java console I/O. For this reason, many educators favor using a "pedagogic" IDE such as BlueJ or DrJava to provide a gentle introduction to the mechanics of Java programming.
To eliminate the gap between pedagogic and professional IDEs for Java, we have developed a plug-in for Eclipse that supports exactly the same programming interface as Dr- Java. It features an Interactions pane for evaluating program statements and expressions "on the fly" as in DrJava. With this plug-in, Eclipse is accessible to beginning programmers. In this configuration, Eclipse is a suitable vehicle for teaching introductory programming--enabling Eclipse to be used across the entire spectrum of the computing curriculum.

View full paper as: (.pdf)


Design Patterns For Marine Biology Simulation

Dung "Zung" Nguyen, Mathias Ricken, and Stephen Wong
March 2004
Presented at SIGCSE 2004

Abstract: We specify and implement a GUI application that simulates marine biological systems by making extensive use of object-oriented design patterns.
The key design patterns are model-view-control, observer/observable, visitor, command, factory method and decorator. These design patterns help delineate the roles and responsibilities of the objects in the system, establish loose coupling between objects and arrange for the objects to communicate and cooperate with one another at the highest level of abstraction. The result is an application that exhibits minimal control flow, yet is powerful, robust, flexible and easy to maintain.
Our work entails a non-trivial redesign of the current AP Computer Science Marine Biology Simulation case study and may serve as a case study for an interoductory "object-first" curriculum.

View full paper as: (.pdf)


Taming Java for the Classroom

James I. Hsia, Elspeth Simpson, Daniel Smith, and Robert Cartwright
February 2005
Presented at SIGCSE 2005

Abstract: Java is the canonical language for teaching introductory programming, but its complex syntax and abundance of constructs are difficult for beginners to learn. This paper shows how object-oriented programming in Java can be made more accessible to beginners through the use of "language levels", a hierarchy of progressively richer subsets of Java. This hierarchy is implemented as an extension of the DrJava pedagogic programming environment.

View full paper as: (.pdf)


Design Patterns for Parsing

Dung "Zung" Nguyen, Mathias Ricken, and Stephen Wong
February 2005
Presented at SIGCSE 2005

Abstract: We provide a systematic transformation of an LL(1) grammar to an object model that consists of

  • an object structure representing the non-terminal symbols and their corresponding grammar production rules,
  • a union of classes representing the terminal symbols (tokens).

We present a variant form of the visitor pattern and apply it to the above union of token classes to model a predictive recursive descent parser on the given grammar. Parsing a non-terminal is represented by a visitor to the tokens. For non-terminals that have more than one production rule, the corresponding visitors are chained together according to the chain of responsibility pattern in order to be processed correctly by a valid token. The abstract factory pattern, where each concrete factory corresponds to a nonterminal symbol, is used to manufacture appropriate parsing visitors.

Our object-oriented formulation for predictive recursive descent parsing eliminates the traditional construction of the predictive parsing table and yields a parser that is declarative and has minimal conditionals. It not only serves to teach standard techniques in parsing but also as a non-trivial exercise of object modeling for objects-first introductory courses.

View full paper as: (.pdf)


A Framework for Testing Concurrent Programs

Mathias Ricken
Masters Thesis
October 2007

Abstract: Incremental, test-driven development is sweeping the software industry, elevating testing from an ancillary activity to an integral part of the programming process. Unfortunately, in our recent experience developing production programs in Java, unit testing has only proven effective in assuring the reliability of code with a single thread of control; it is much less effective in concurrent programs.

To facilitate the development of concurrent programs, we are developing:

  1. An extension of the JUnit framework that actively supports the developer by treating tests that could silently ignore failures in auxiliary threads as test errors;
  2. A lightweight Java annotation language that can be used to specify and check the threading invariants of both existing and new code;
  3. A testing framework that can record and analyze the schedules of unit tests, detect deadlocks, and run the tests using modified schedules, increasing the likelihood that concurrency problems are discovered.

View full thesis as: (.pdf)


ConcJUnit: Unit Testing for Concurrent Programs

Mathias Ricken and Robert Cartwright
August 2008
Presented at PPPJ 2009

Abstract: In test-driven development, tests are written for each program unit before the code is written, ensuring that the code has a comprehensive unit testing harness. Unfortunately, unit testing is much less effective for concurrent programs than for conventional sequential programs, partly because extant unit testing frameworks provide little help in addressing the challenges of testing concurrent code. In this paper, we present ConcJUnit, an extension of the popular unit testing framework JUnit that simplifies the task of writing tests for concurrent programs by handling uncaught exceptions and failed assertions in all threads, and by detecting child threads that were not forced to terminate before the main thread ends.

View full paper as: (.pdf)


Test-First Java Concurrency for the Classroom

Mathias Ricken and Robert Cartwright
March 2010
Presented at SIGCSE 2010

Abstract: Concurrent programming is becoming more important due to the availability of multi-core processors and the prevalence of graphical user interfaces (GUIs). To adequately prepare students for the concurrent future, instructors have begun to address concurrency even in introductory courses. Unfortunately, practices like test-driven development that give students a safe footing in single-threaded environments do not extend well into the concurrent domain. This paper describes how ConcJUnit can simplify writing unit tests for multi-threaded programs, and provides examples that can be used to introduce students to concurrent programming.

View full paper as: (.pdf)

Hosted by SourceForge.net DrJava has been partially funded by the National Science Foundation, the Texas Advanced Technology Program, and Sun Microsystems, Inc.