1

Hey, I wanna to add AOP to my web project. I download ajdt2.0.1 for eclipse 3.4.1. But when I convert this project to AspectJ projects, I got so many compile errors which shouldn't occur. Such as "XXXDAO cannot be resolved", etc. When I remove AspectJ Capability, everything goes well. Does anyone meet this problems? Thanks in advance.

Andrew Eisenberg
  • 28,387
  • 9
  • 92
  • 148
xiaowl
  • 5,177
  • 3
  • 27
  • 28
  • First, I'd recommend upgrading to Eclipse 3.6. 3.4 is no longer supported. Second, I need some more information. Such as what are the complete error messages and what is on your classpath. – Andrew Eisenberg Dec 09 '10 at 06:10
  • code: System.out.println("Login user:" + userID); I get error "String literal is not properly closed by a double-quote". code :for (UserAllActionBean bean : list), error: "Syntax error on token ",", ; expected" My classpath contains: Tomcat6.0 library AspectJ Runtime Library which is aspectj 1.6.6. JRE 6.0. WebApp Library. Btw, now I am working with eclipse 3.3 and AJDT 1.5.3, AJ works fine. – xiaowl Dec 10 '10 at 04:00
  • And all these compile errors are so mysterious, all java source files are compiled successfully when I remove AspectJ Capability. And the same project can be converted successfully wtih Eclipse 3.3 and AJDT 1.5.3 . – xiaowl Dec 10 '10 at 04:05

1 Answers1

-1

I have solved it by set ajc option with "-encoding UTF-8". That's mysterious, cause the encoding of eclipse is exactly utf-8. Does that mean ajc use my OS default encoding?

xiaowl
  • 5,177
  • 3
  • 27
  • 28
  • 1
    Hi Xiaowl, I also encountered this issue. Could you please tell me how do I set ajc option with "-encoding UTF-8" in eclipse? Thanks! – Jiechao Wang Jan 06 '14 at 22:13