#220 HELP


Downloaded the newest version of Dr java, and the JDK 6 from sun. Dr Java keeps telling me there is no compiler available. Doesn't the JDK come with a compiler? Why can't Dr java find it? What do I do now?


  • Mathias Ricken

    Mathias Ricken - 2009-09-02

    We need to know a little bit more about your system to help you. Please go to "Help -> About" on the menu and click on "System Properties". Then, click the "Copy System Properties" button and paste the results here in a new comment.

    The DrJava Team

  • Nobody/Anonymous

    DrJava searches for the "javac" compiler in common locations (both absolute and relative to the directory containing the JVM). In a Sun JDK, the compiler is located in the file tools.jar in the lib directory that is a sibling of the bin directory containing the binary file ("java") that starts the JVM. But "java" can be executed from a "JRE" intstallation as well as a "JDK" installation; a JRE installation does not include tools.jar. If the "java" command on your machine resolves to a JRE installation instead of a JDK, drjava may still find the tools.jar file in a JDK installation provided the the absolute path name to the JDK lib directory is the default chosen by Sun. Otherwise, you may have to set the path name to the tools.jar file in the DrJava preferences panel (which can be selected using the "Preferences" command at the bottom of the "Edit" menu). The tools.jar location can be specified in a dialog box in the "Resouce Locations" subpanel of the preferencs panel.

    We generally recommend configuring your machine so that specifying a particular tools.jar file is unnecessary. When a tools.jar file path name is specified in DrJava preferences (recorded in the file ".drjava" in the users home directory), DrJava assumes the path is correct. If this path ever becomes erroneous, DrJava will not find a javac compiler even if one exists in a standard location. To avoid specifying the location of "tools.jar", change your shell path so that "java" resolves to a "java" binary within a JDK rather than a JRE.


Log in to post a comment.