Community
Participate
Working Groups
I am using 1.1rc1. This is a regression since rc1 and a deviation from javac. I am guessing this may have to do something with change in the underlying Eclipse compiler. Create a class in a subpackage such as: package subpackage; public class Test { public static void main(String[] args) { System.out.println("Hello"); } } Then compile using following command: > ajc subpackage\Test.java You will see a directory "subpackage" created under the existing "subpackage" directory. The test.class is then put in subpackage\subpackage directory. This means running java command results in Exception in thread "main" java.lang.NoClassDefFoundError: subpackage/Test Running either of the following command fixes the problem: > ajc -d . subpackage\Test.java or > javac subpackage\Test.java No big deal, really. But it will be nice to have same behavior as javac.
This was a significant regression from 1.1rc1. It is now fixed in the tree with a test in org.aspectj.ajdt.core/*/BasicCommandTestCase. The behavior should exactly mimic that of javac (and the eclipse command-line compiler) when -d is not passed. We had no test cases for this behavior because all of our testing infrastructure explicitly passes in an output directory to keep class files out of the source tree.