Professor  J:   Java in Racket
1 Professor  J Languages for Racket Modules
2 Class Search Paths

ProfessorJ: Java in Racket

ProfessorJ is a plug-in for DrRacket that implements variants of Java, especially for teaching purposes. After installing ProfessorJ (and restarting DrRacket, if necessary), use the Choose Language... dialog in DrRacket to select one of the languages. For information on the supported languages, see How to Design Classes Languages.

ProfessorJ’s languages are also available for use with #lang. For example,

#lang profj/full
class Example {
  static String result = null;
  public static void Main(String[] args) {
    result = "Hi";

is a program in ProfessorJ’s Full language. The Racket view of this module is that it has an Example submodule that exports an Example class, an Example-main-java.lang.String1 function, and an Example-result~f variable, among other bindings.

1 ProfessorJ Languages for Racket Modules

 #lang profj/full package: profj

2 Class Search Paths

When ProfessorJ compiles a program that includes a reference to a class C, it searches for the class’s definition with the following sequence:

A ProfessorJ source file as in the last case normally must be compiled in advance to "compiled/C.jinfo" and "compiled/C_rkt.zo" files.