#889 HJ generates class files in wrong directories

open
nobody
5
2010-10-04
2010-10-04
Mathias Ricken
No

When using the HJ compiler from within DrJava, the HJ compiler generates class files for classes not in the default package in the wrong directories.

Example: The foo.bar.HelloWorld class is in the directory
/Users/mgricken/bin/hj.release/examples/foo/bar/

The class files should be generated in the same directory (or in the foo/bar subdirectory of the build directory).

Due to a bug, the class files are generated in /Users/mgricken/bin/hj.release/examples/foo/bar/foo/bar.
The package part of the directory is replicated in the directory of the source file. The class files are even generated there if a build directory is set, i.e. the compiler ignores the build directory setting.

Discussion

  • Mathias Ricken
    Mathias Ricken
    2010-10-04

    I fixed part of this bug in revision 5401.
    When using a project with a build directory set, DrJava will now put the classes in the right place. Without a build directory set, the problem still exists.

    This is because the HJ compiler does not mimic the javac behavior of putting classes in the same directory as the source file, if no destination directory is specified.