Community
Participate
Working Groups
I am using J2SDK 1.4.1_03. When I tried loading a sample .lst file and building it in the 1.1.1rc1 ajbrowser, it errors: C:\eclipse\workspace\ajdt.figures.demo.begin\figures\Box.java:1-1:0: This compilation unit indirectly references the missing type java.lang.Object (typically some required class file is referencing a type outside the classpath)
Created attachment 7560 [details] Simple class to reproduce the problem
Created attachment 7561 [details] Build configuration file to use with simple class
I am also experiencing this problem, and have attached a simple example that compiles using ajc, but not with ajbrowser. Here is the method I have been using: 1. Launch ajbrowser by typing "ajbrowser". 2. Click on the "select build configuration" button, and load simple.lst. 3. Click the build button to build. I am running AspectJ 1.1.1 on Red Hat 9.
WORKAROUND: In ajbrowser, under Tools -> Options, set "other compiler options" to "-verbose". For some reason, this made the problem go away.
This error message is a result of the compiler not being able to find java.lang.Object which it is expecting from JDK's rt.jar file. The AspectJ Browser gets the path to the rt.jar file from the sun.boot.class.path system property. So regarding the original report, this may have become incorrect when you moved JDK. You can always set the AJBrowser's classpath explicitly by going to the "Options" dialog and setting the entry in the "AJBrowser Options" tab. Note that if you leave this empty the browser will pick up whatever classpath it was launched with. With this empty the classpath resolution should be idnetical to what ajc uses. Regarding Comment #4, setting the "-verbose" could would have caused the same behavior as removing the classpath--i.e. the system classpath was picked up. So as far as I can tell this is not a bug. But please reopen this report if you come across AJBrowser resolving the classpath differently than ajc, and you have not explicitly set its classpath to be different.