Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] [AspectJ] Why do I need aspectjrt.jar

There is nothing special about the bytecodes produced by the AspectJ compiler - they are fully compliant with the JVM specification (and if they aren't in any case, that would be a serious bug). The requirement for aspectjrt.jar to be on the classpath is no different to the requirement for say log4j.jar to be on the classpath if you used Log4j.
 
If the server is using 100% CPU resources, is it possible you've got some advice that is advising itself? I know self-advice is cheaper than going to an outside consultant, but it generally ends up using a lot of CPU and dying with a StackOverflowError ;).
 
-- Adrian.
adrian_colyer@xxxxxxxxxx
 
 
 
06 August 2004 15:06
To: <aspectj-users@xxxxxxxxxxx>
cc:
From: "Sascha Benkart" <Sascha.Benkart@xxxxxx>
Subject: RE: [aspectj-users] [AspectJ] Why do I need aspectjrt.jar


Hi Russ,
 
thanks for your answer. I used AspectJ in former projects (without the Integration Server) and I really love it.
Thus I want to use it in my Integration Server package. But unfortunately the server doesn't come up, using 100% of system resources. Is AspectJ really code compatible to "normal" Java. Do you have any idea why it is not possible to use it? Only standard lib jce.jar is replaced by iac.jar, another security component. Is there a tool to compare Java code with and without AspectJ weaving.
 
Regards,
Sascha
 


From: aspectj-users-admin@xxxxxxxxxxx [mailto:aspectj-users-admin@xxxxxxxxxxx] On Behalf Of Russell Miles
Sent: Donnerstag, 5. August 2004 23:37
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] [AspectJ] Why do I need aspectjrt.jar

Hi Sascha,

You need aspectjrt.jar to support the objects that AspectJ compilation has added into your application to facilitate your aspects.

During the compilation process the ajc command line tool weaves in certain constructs to make your aspects work. This weaving, whilst totally compatible with regular object-oriented Java, requires some additional support features that are available in the aspectjrt.jar and so, just like in any other application where you are using extra facilities beyond the standard libraries, you need to have those constructs available at runtime as well as compile time.

Hope this makes sense :-)

Russ

On 5 Aug 2004, at 21:36, Sascha Benkart wrote:

Hi,
 
I want to use AspectJ 1.2 for a webMethods Integration Server (Java 1.4, but without jce.jar) project. Unfortunately the server is not running if I add a package (a Java unit) compiled with AspectJ (using 100% of system resource).
AspectJ weaves the aspect code into the existing classes. Why do I need to add the aspectjrt.jar to my project on runtime? At compile time it is clear why I need the jar file.
 
Cheers!
Sascha

Back to the top