All available configuration options are displayed in the following sections. The option keys and default values are also provided for users who wish to edit their configuration file.
These options specify where to find Java resources on your computer, such as compilers or classpath directories.
browser.file = "")
browser.string = "")
These two settings allow you to specify how Javadoc files and links from the Help files are opened. On Windows and Mac OS X, we suggest that you leave both options blank so that the default browser of the OS will be used. On other platforms, e.g. on Linux, you need to set one or both of them to let DrJava successfully open HTML files.
The filename specified as "Web Browser", if one is set, is the executable that will be run. If no text has been entered as "Web Browser Command", then only the URL will be passed as parameter to the executable.
If text has been entered as "Web Browser Command", then any occurrence of "
<URL>" will be replaced with the URL to open. If "
<URL>" never occurs. then the URL to open will be appended to the very end.
Note that this means there are several ways of accomplishing the same thing. Let's assume that "
/usr/bin/mozilla" is the filename of the browser. Then these settings all accomplish the same thing:
/usr/bin/mozilla" as "Web Browser" and nothing as "Web Browser Command"
/usr/bin/mozilla" as "Web Browser" and "
<URL>" as "Web Browser Command"
Nothing as "Web Browser" and "
/usr/bin/mozilla" as "Web Browser Command"
Nothing as "Web Browser" and "
/usr/bin/mozilla <URL>" as "Web Browser Command"
Useful settings for Linux: Leave the "Web Browser" setting blank and enter the text specified below as "Web Browser Command".
Mozilla (if it is already running)
mozilla -remote "openurl(<URL>)"
Mozilla (if it is not already running)
Konqueror (the KDE web browser)
Useful settings for Windows: If you do not want the system's default web browser, either specify the executable as "Web Browser" and leave the "Web Browser Command" blank, or leave the "Web Browser" setting blank, and enter the command line as "Web Browser Command". If the web browser's filename contains spaces, then the filename must be surrounded by double quotes in the "Web Browser Command". Example:
Leave the "Web Browser" setting blank and enter the following text as "Web Browser Command":
"C:\Program Files\Internet Explorer\iexplore.exe" <URL>
Useful settings for Mac OS X: If you do not want the system's browser, we advise that you use the "Web Browser Command" and leave the "Web Browser" setting blank. If possible, use Mac OS X's "open" command as in the examples below:
Open in Safari: Leave the "Web Browser" setting blank and enter the following text as "Web Browser Command":
open -b com.apple.Safari <URL>
Open in TextEdit: Leave the "Web Browser" setting blank and enter the following text as "Web Browser Command":
open -b com.apple.TextEdit <URL>
javac.location = "")
Specifies the location of the JDK's
tools.jar, which contains the classes necessary for the compiler and the debugger. This file is usually found in the JDK's
all.compiler.versions = false)
By default, DrJava only displays one compiler per major version, even if multiple updates are found (Example: You have JDK 6 Updates 10 and 14 installed; DrJava will only display JDK 6 Update 14). To display all compiler versions, mark this checkbox. Note: You have to restart DrJava when you change this setting.
extra.classpath = "")
Used to specify any directories or
jar files to append to the classpath of the Interactions window and the compiler. Separate the directories using the system-specific path separator (eg. colon on Unix, semicolon on Windows).
These configurable options affect how DrJava's user interface is displayed.
look.and.feel = "")
Name of the Swing LookAndFeel class which determines the general appearance of DrJava. If this option is changed while DrJava is running, the changes will not apply until you restart.
plastic.theme = "DesertBlue")
If Plastic is selected as Look and Feel, then this setting changes the theme that is used to display DrJava. If Plastic is not selected, changing this setting has no effect. If this option is changed while DrJava is running, the changes will not apply until you restart.
toolbar.icons.enabled = true, toolbar.text.enabled = true)
These radio buttons control whether the toolbar buttons contain text, icons, or both. When set manually in the config file, each of the two options can be set to true or false, though icons will be displayed if both are set to false.
lineenum.enabled = false)
Whether to display all line numbers along the left margin of the Definitions Pane.
show.source.for.fast.switch = true)
Whether a sample of the source code around the current caret position should be shown in the Fast Switch window.
show.code.preview.popups = false)
Whether a sample of the source code around the document location should be shown in the Breakpoints, Bookmarks and Find Results panes.
clipboardhistory.store.size = 10)
How many entries are saved in the clipboard history.
dialog.gotofile.fully.qualified = false)
Whether the "Go to File" dialog should also include the fully-qualified class names. Example: There is a file myPackage/MyClass.java (in the myPackage package). With this setting enabled, the "Go to File" dialog will contain both MyClass.java and myPackage.MyClass.java; with the setting disabled, it will only contain MyClass.java.
dialog.completeword.scan.class.files = false)
When this option is enabled, a project is open, and a build directory has been set, DrJava will scan all class files after each compile and add their names to the auto-completion list. This allows DrJava to auto-complete the class names of all user classes, not just the names of the open document. This option requires additional disk accesses and therefore slows down compiles.
dialog.completeword.javaapi = false)
When this option is enabled, DrJava will include the names of the standard Java API classes in the list of names used for auto-completion.
display.right.margin = true)
Enable this option to let DrJava display a vertical line representing the right margin of the document.
right.margin.columns = 120)
This option controls the position of the right margin. By default, the right margin line is displayed after 120 columns, provided the "Display Right Margin" option above is enabled.
Each font option is specified as a string containing the font name, style, and size, separated by dashes. The style should be in upper-case (ie. PLAIN, BOLD, ITALIC, or BOLDITALIC), while the font name must be a valid font on the system. (In most cases, using the font chooser in the Preferences window is the simplest approach.)
font.main = Monospaced-PLAIN-12)
This font is used for the definitions pane and the tabs at the bottom of the window.
font.doclist = Monospaced-PLAIN-12)
This font is used for the line numbers on the left side of the Definitions Pane, if the "Show All Line Numbers" option in the "Display Options" section is enabled. The actual font size will be limited by the size of the Main Font.
font.doclist = Monospaced-PLAIN-10)
This font is used in the list of all open documents on the left side of the window.
font.toolbar = dialog-PLAIN-10)
This font is used on the toolbar buttons, if the button names are configured to be displayed.
Colors are defined similarly to HTML colors: as six hexadecimal digits preceded by a pound sign. The first two digits specify a red value, the next two specify a green value, and the next two specify a blue value. For example,
#00FF00 would be a bright green. (In most cases, using the color chooser in the Preferences window is the simplest approach.)
Syntax Colors for Definitions
definitions.normal.color = #000000)
Used as the default color for program text.
definitions.keyword.color = #0000FF)
Used as the color for known keywords (eg. "public", "for").
definitions.type.color = #00007C)
Used for known primitive types (eg. "int") and capitalized words, which usually correspond to class names.
definitions.comment.color = #007C00)
Used as the color for all comments.
definitions.double.quoted.color = #B20000)
Used as the color for strings, which use double quotation marks.
definitions.single.quoted.color = #FF00FF)
Used as the color for characters, which use single quotation marks.
definitions.number.color = #00B2B2)
Used as the color for all numbers.
definitions.background.color = #FFFFFF)
Used as the background color for all panes.
definitions.match.color = #BEFFE6)
Used as the highlight color when matching braces.
compiler.error.color = #FFFF00)
Used as the highlight color for compiler errors and JUnit test failures.
bookmark.color = #00FF00)
Used as the highlight color for bookmarks.
find.results.color1 = #FF9933,
find.results.color2 = #30C996,
find.results.color3 = #30FCFC,
find.results.color4 = #FF66CC)
Used as the highlight color for find results.
debug.breakpoint.color = #FF0000)
Used as the highlight color for breakpoints.
debug.breakpoint.disabled.color = #800000)
Used as the highlight color for disabled breakpoints.
debug.thread.color = #64FFFF)
Used as the highlight color for the location of the current thread in the debugger, shown after a breakpoint is hit or a step has occurred.
system.out.color = #007C00)
Used as the color for text from System.out.
system.err.color = #FF0000)
Used as the color for text from System.err.
system.in.color = #7C007C)
Used as the color for text to be read by System.in.
interactions.error.color = #B20000)
Used as the color for text that indicates errors in the Interactions Pane.
debug.message.color = #0000B2)
Used as the color for text displayed by the debugger.
rjava.errors.button.color = #FF0000)
Used as background color for the "DrJava Errors" button that is displayed in case of an internal DrJava error.
right.margin.color = #CCCCCC)
Used as line color for the vertical line representing the right margin of the document, if the line is enabled.
DrJava can save the last position of the main window and its dialogs and restore them the next time DrJava is started.
window.store.position = true)
Whether to save the position and size of the DrJava window between sessions.
dialog.clipboardhistory.store.position = true,
dialog.gotofile.store.position = true,
dialog.openjavadoc.store.position = true,
dialog.completeword.store.position = true,
dialog.jaroptions.store.position = true)
Whether to save the position and size of the indicated dialog between DrJava sessions.
By pressing this button, you can reset the position and size of the indicated dialog to its default value. This is useful if the dialog somehow appeared outside the screen and is not accessible, e.g. when switching from a dual-screen computer to a single-screen computer.
tabbedpanes.detach = false)
By default, the tabbed panes are attached to the bottom of DrJava's main window. By selecting this option, DrJava displays the tabbed panes in their own separate window.
debugger.detach = false)
By default, the debugger pane is displayed in DrJava's main window. By selecting this option, DrJava displays the debugger in its own separate window.
Most menu items in DrJava have configurable keyboard shortcuts, along with several other navigational commands (such as moving to the beginning or end of a line). All such options are displayed on the Key Bindings panel in the Preferences window, along with their current value. Clicking on the value displays a window which allows the user to type a new key, showing any conflict with an existing key if there is one. Users may bind multiple keys to a single action as long as there are no conflicts and may add or remove key bindings as desired. (We recommend editing these options in the Preferences window.)
Configurable options relating to compiling source code in DrJava. Note that Compiler Warnings are not shown when compiling any Java Language Level files. Also note that the Compiler Warnings options are all passed using the "-Xlint:" flag, which is a non-standard option and may not work with all implementations of the JDK.
show.unchecked.warnings = true)
Passes the "-Xlint:unchecked" warning to javac. This will give more detail for unchecked conversion warnings that are mandated by the Java Language Specification.
show.deprecation.warnings = true)
Passes the "-Xlint:deprecation" warning to javac. According to the JLS, this will show a description of each use or override of a deprecated member or class.
show.path.warnings = false)
Passes the "-Xlint:path" warning to javac. According to the JLS, this will warn about non-existent path (classpath, sourcepath, etc.) directories.
show.serial.warnings = false)
Passes the "-Xlint:serial" warning to javac. According to the JLS, this will warn about missing serialVersionUID definitions on serializable classes.
show.finally.warnings = false)
Passes the "-Xlint:finally" warning to javac. According to the JLS, this will warn about finally clauses that cannot complete normally.
show.fallthrough.warnings = false)
Passes the "-Xlint:fallthrough" warning to javac. According to the JLS, this will check switch blocks for fall-through cases and provide a warning message for any that are found. Fall-through cases are cases in a switch block, other than the last case in the block, whose code does not include a break statement, allowing code execution to "fall through" from that case to the next case.
default.compiler.preference = No Preference)
Controls which compiler DrJava should choose when it starts. If no preference is set, DrJava will choose the newest compiler it can find.
Configurable options relating to interpreting code in the Interactions Pane.
history.max.size = 500)
Specifies how many commands will be remembered in the history of the Interactions window. Previous commands can be recalled using the up and down arrow keys.
dialog.autoimport.enabled = true)
When this option is enabled, DrJava will display a dialog to automatically import classes when a class name is interpreted but not known. After the class has been selected, DrJava will execute the appropriate "import" statement and re-execute the line that caused the dialog to appear.
interactions.auto.import.classes = )
This option allows you to select classes and packages that should be imported automatically whenever the Interactions Pane is reset. List fully-qualified class names (e.g. java.util.ArrayList, or packages ending with a *, e.g. java.util.*).
sticky.interactions.dir = true)
If this option is enabled, DrJava will restore the directory that was last used in the Interactions Pane. If it is disabled, DrJava will always use the value of the "user.home" property.
smart.run.for.applets.and.programs = true)
If this option is enabled, DrJava will run applets and ACM Java Task Force Programs using the "Run" and "Run Project" buttons as well. These applets and ACM Java Task Force Programs do not need to have a main method to be run, as long as they are proper applets or ACM Java Task Force Programs.
dynamicjava.access.control = disabled)
This option controls the access control DrJava performs when class members are accessed. If the option is set to 'private and package only', then access control is used for all class members that are private or package private. If it is set to 'private only', then access control is used only for private members, and the other access levels can always be accessed. If it is set to 'disabled', all class members can be accessed, regardless of their access level. (Note: Currently, access control in DrJava's Interactions Pane has not been fully implemented; at most, access is checked for private and package private members; protected members can always be accessed.)
dynamicjava.require.semicolon = false)
If this option is enabled, then DrJava will require a semicolon at the end of statements in the Interactions Pane.
dynamicjava.require.variable.type = true)
If this option is enabled, then DrJava will a variable type for variable declarations in the Interactions Pane (e.g.
int i = 5). If it is disabled, DrJava will attempt to assign a variable type automatically (e.g.
i = 5 to declare an
All configurable options relating to the debugger.
debug.sourcepath = "")
A list of directories on which to search for source files when stepping through code. The debugger will attempt to open files from these directories automatically when stepping.
debug.step.java = false)
Whether to step into Java source files when stepping through a suspended method call. It is recommended to put the Java source (usually distributed with the JDK) on the Sourcepath if this option is selected.
debug.step.djava = false)
Whether to step into DynamicJava source files when stepping through a suspended method call. DynamicJava is the Java interpreter used in the Interactions pane, and the source can be obtained from http://koala.ilog.fr/djava. Useful primarily when debugging DrJava itself.
debug.step.drjava = false)
Whether to step into DrJava source files when stepping through a suspended method call. Useful primarily when debugging DrJava itself.
debug.step.exclude = "")
Allows you to specify other classes/packages to step over. This should be a list with fully qualified names. To exclude a whole package, add
packagename.* to the list. You might use this box to exclude instructor provided libraries, for example
debug.auto.import = true)
Automatically imports all classes and packages again that had been imported when the program was last suspended, i.e. before the breakpoint was hit or before the last step was taken.
auto.step.rate = 1000)
The delay interval at which Automatic Trace steps into every single line of code of the program.
All configurable options relating to generating Javadoc.
javadoc.access.level = "package")
Specifies the lowest access level for fields and methods to include in the generated documentation. Legal values are "public", "protected", "package", and "private".
javadoc.link.version = (JDK Version))
Specifies which URL to use when generating links to Java library classes. Legal values are "1.3", "1.4", and "none" if no links to Java library classes are desired. (This option defaults to the version of the user's JDK.)
This setting also controls which of the URLs below is used for the "Open Java API Javadoc" feature.
javadoc.1.3.link = "http://java.sun.com/j2se/1.3/docs/api")
The URL to use when generating links to JDK 1.3 library classes or opening the Javadoc pages for the Java API.
javadoc.1.4.link = "http://java.sun.com/j2se/1.4/docs/api")
The URL to use when generating links to JDK 1.4 library classes or opening the Javadoc pages for the Java API.
javadoc.1.5.link = "http:/java.sun.com/j2se/1.5/docs/api")
The URL to use when generating links to JDK 1.5 library classes or opening the Javadoc pages for the Java API.
javadoc.1.6.link = "http://java.sun.com/javase/6/docs/api")
The URL to use when generating links to JDK 1.6 library classes or opening the Javadoc pages for the Java API.
junit.3.8.2.link = "http://www.cs.rice.edu/~javaplt/javadoc/junit3.8.2")
The URL to use when generating links to JUnit 3.8.2 library classes or opening the Javadoc pages for the Java API.
javadoc.additional.link = )
A list of URLs used to open Javadoc pages for user-specified libraries. Please enter the URL to the directory that contains the
allclasses-frame.html file. For example, to open DrJava's Javadoc, enter
javadoc.destination = "")
If a directory is specified, it will be used as the default when generating new documentation.
javadoc.custom.params = "")
Any custom parameters to pass to the Javadoc tool, separated by spaces. Use "javadoc -help" at a command line to view the available parameters.
javadoc.from.roots = false)
If this option is enabled, then Javadoc will not only search the current package and all subpackages for files, it will also search all "enclosing" packages (those at a higher level).
Configures how often DrJava notifies you for certain events. The notifications in this section can all be suppressed by clicking on a "Do not show this message again" checkbox (or similar) on the notification itself.
quit.prompt = true)
Whether to display a confirmation message before DrJava quits.
interactions.reset.prompt = true)
Whether to display a confirmation message before resetting the Interactions Pane.
interactions.exit.prompt = true)
Whether to display a message if the Interactions Pane is exited without the Reset button being clicked.
javadoc.prompt.for.destination = true)
Whether to always display the destination selection dialog when starting Javadoc.
prompt.before.clean = true)
Whether to display a confirmation message before cleaning the build directory of a project.
save.before.compile = false)
Whether to automatically save all files each time a Compile command is chosen.
compile.before.junit = false)
Whether to automatically compile before running JUnit tests.
save.before.javadoc = false)
Whether to automatically save all files each time a Javadoc command is chosen.
warn.breakpoint.out.of.sync = true)
Whether to warn if setting a breakpoint in a source file that is not in sync with its class file.
warn.debug.modified.file = true)
Whether to warn if using the debugger on a file which has been modified since its last save.
warn.change.laf = true)
Whether to warn that changes to the Look and Feel do not take effect until after a restart.
warn.path.contains.pound = true)
Whether DrJava should warn the user if the file being saved has a path that contains a '#' symbol. Users cannot use such files in the Interactions Pane because of a bug in Java.
dialog.drjava.error.popup.enabled = true)
Whether to show a popup dialog when the first internal DrJava error occurs. If this option is not selected, DrJava will try to continue quietly and only display the "DrJava Errors" button (See DrJava Errors).
warn.if.compiz = true)
Whether DrJava should warn the user if Compiz is detected (see Compiz Detected dialog). DrJava suffers from an incompatibility between the Linux window manager Compiz and Oracle's Swing Java GUI library. We, the developers of DrJava, cannot do anything to fix this problem. We hope that future versions of Java and Compiz will address the incompatibility. In the meantime, we recommend that you disable Compiz if you experience problems. We also suggest that you use the latest versions of Compiz and Java, so you can benefit from possible bug fixes made by Oracle and the Compiz developers. For more information, see http://drjava.org/compiz/.
delete.ll.class.files = always)
Whether Drjava should delete class files generated from Language Level source files (.dj0, .dj1, and .dj2) before compilation. This may be necessary to avoid problems with the Language Level facility. Selecting "always" will do this automatically without involving the user. Selecting "ask me" will display a notification window and let the user decide. Selecting "never" will not delete class files nor ask the user to do so.
new.version.notification = stable and beta versions only)
Whether Drjava should check if a newer version of DrJava exists. Setting this to "none (disabled)" will not check for newer versions. The other setting select what kind of versions will be considered, ranging from "stable versions only" to "weekly experimental builds".
new.version.notification.days = 7)
How many days have to pass before DrJava will look for a new version again. By default, DrJava will check every seven days..
These are the remaining configurable options in DrJava.
indent.level = 2)
Sets how many spaces to use for each level of indenting. Note that tab characters are not allowed in DrJava.
recent.files.max.size = 5)
Specifies how many recently used files to display in the File menu.
browser.history.max.size = 50)
Specifies how many source code locations are stored in the browser history.
auto.close.comments = false)
Whether to automatically insert the string designating the end of a multi-line comment after beginning one.
javac.allow.assert = false)
Whether to support the
assert keyword when compiling with a JDK 1.4 or later compiler.
files.backup = true)
Whether DrJava should keep a backup copy of each file that the user modifies, saved with a "~" at the end of the filename.
reset.clear.console = true)
Whether DrJava should clear the contents of the Console Tab each time the Interactions Pane is reset.
force.test.suffix = false)
Whether to require that JUnit test classes in projects end in "Test". If this is enabled, classes that do not end in "Test" will not be considered JUnit tests when in project mode.
find.replace.focus.in.defpane = false)
Whether to put the focus in the Definitions pane after using find/replace. If this option is not enabled, the focus will remain in the Find/Replace pane.
drjava.use.force.quit = false)
On some systems (namely tablet PCs), DrJava does not shut down properly when quit. Select this option to remedy this problem.
remote.control.enabled = true)
Java's "remote control" allows other applications to control certain aspects of DrJava, for example what file is displayed. This feature is also necessary if you want to double-click on a .java file to open the file in an existing instance of DrJava.
remote.control.port = 4444)
Selects the port that Drjava uses for its remote control.
follow.file.delay = 300)
Specifies the number of milliseconds that have to pass before DrJava will update a "Follow File" window again.
follow.file.lines = 1000)
Specifies the number of of lines that a "Follow File" window may contain. If a file has more than this many lines, only the end of the file will be displayed.
Configurable options for file types. Note that the options here are only available on Windows, and only if the .exe file is used.
.drjava files are DrJava project files. .djapp files are DrJava add-ons. .java files are Java source files.
Set the file type associations so that double-clicking on .drjava and .djapp files in the Windows Explorer will open them in DrJava.
Remove the association of .drjava and .djapp files with DrJava.
Set the file type associations so that double-clicking on .java files in the Windows Explorer will open them in DrJava.
Remove the association of .java files with DrJava.
file.ext.registration = ask me at startup)
Specifies whether Drjava should automatically associate .java, .drjava and .djapp files with DrJava so those files are opened with DrJava when double-clicked. When set to the default, "ask me at startup", DrJava will check at startup if those associations exist, and if not, present a dialog allowing the user to set the file associations (see Set File Associations dialog). Setting this option to "always" will set the file associations automatically at startup without user interaction. Setting it to "never" will not change file associations nor ask the user.
Configurable options for the two Java Virtual Machines (JVMs) that DrJava uses.
master.jvm.xmx = default)
Specifies how many megabytes of memory Java should use for the Main JVM (the main part of DrJava including the editor and compiler). The "default" setting leaves this up to Java. If you experience "Out of memory" errors, set this to a value that is larger than 64 MB (default in Java 5) but smaller than the amount of physical memory you have. If it is still too small, choose the next bigger setting. Note: You have to restart DrJava for changes to become effective.
master.jvm.args = "")
Specifies the JVM arguments that should be used for DrJava's Main JVM, other than the maximum heap size (-Xmx), which is controlled using the option above. Note: You have to restart DrJava for changes to become effective.
slave.jvm.xmx = default)
Specifies how many megabytes of memory Java should use for the Interactions JVM (used to interpret code in the Interactions Pane and to run programs developed in DrJava). The "default" setting leaves this up to Java. If you experience "Out of memory" errors, set this to a value that is larger than 64 MB (default in Java 5) but smaller than the amount of physical memory you have. If it is still too small, choose the next bigger setting. Note: You have to reset the Interactions Pane for changes to become effective.
slave.jvm.args = "")
Specifies the JVM arguments that should be used for DrJava's Interactions JVM, other than the maximum heap size (-Xmx), which is controlled using the option above. Note: You have to reset the Interactions Pane for changes to become effective.