是不是aspectj的运行库不在classpath下?

解决方案 »

  1.   

    具体情况是:
      我已经加载了aspectjrt.jar运行时库,用aspecj for jbuilder的编译器编译没有错误,但是我发现,它却并没有将我编写的aspect文件编译成 .class中间码;所以我检查了工程的.lst列表文件,但是在列表中并没有缺少该aspect文件。另外,在我要运行工程的时候,jbuilder还是要编译我的文件(尽管我aspecj for jbuilder的编译器编译过了),所以提示他无法识别aspect关键词。
      但是同样的源文件,我用aspectj自带的ajc编译器编译后,却可以将我的aspect文件编译成 .class中间码,然后用java命令运行它,一切正常!
      

  2.   

    你说的问题,我从没遇到过,你确信把aspectjrt.jar加载了吗。
    你的jbuilder 能正常使用吗?
    你也可以用其他开发工具啊
      

  3.   

    请问你是如何配置JBbuilder的?
      

  4.   

    JBuilder7 users please note: when you set up a run/debug configuration you must select the "Build Target" (at the bottom of the "Runtime Properties" dialog) to be "<None>". This will ensure that the Java compiler is not invoked on your AspectJ sources before running or debugging the project.