Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Invoking ajc from code

Hello,
I'm writing an Eclipse plug-in that needs to compile some files using ajc. Currently, I do this using Runtime.exec(..) to execute the ajc executeable and pass it the files and other options as arguments, however I was wondering if there's a better way of doing this, by invoking the compiler directly from within my code?

I tried org.aspectj.tools.ajc.Main.main(..) and org.aspectj.ajdt.ajc.AjdtCommand.runCommand(..) but both generate the following error:

error can't find type org.aspectj.lang.JoinPoint

However, AspectJRT.jar is in my classpath - is this error appearing because I'm trying to invoke the compiler from within Eclipse?

Is there any way to get rid of this error, or can you think of a better way of achieving the same results?

Best wishes,
Marc Hull


Back to the top