Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] aspectjrt.jar name

> Why does it check for
> a JAR named aspectjrt.jar?

ajc checks for aspectjrt.jar both to ensure the
org.aspectj.lang..* classes are available and to
verify that the version of the runtime classes is
the same as that of the compiler.  Both being
common mistakes, it saved a lot of support time to
provide the warnings.  However, ajc will emit an
error only if it can't find a runtime type the code
uses (e.g., JoinPoint).

When renamed, the jar and version check is failing,
but the types are being found.  You could end up
using the wrong version of runtime classes without
being warned about it, but it should work fine.

We debated sealing the runtime classes or emitting
an error if the aspectjrt.jar were not on the
classpath, but both seemed too inflexible for
some of the applications we anticipate.  It would
be nice if we inspected the jar containing the
runtime types for its version rather than seeking
a particular named jar, or if we searched for
reasonable variants of the name (see, e.g., the
Ant taskdef search for aspectjtools.jar variants,
which could be generalized in a ..util.Lang method);
a patch from a contributor would be welcome here!

(That's more than you ever wanted to know about...)

Wes


Volkmann, Mark wrote:
Interestingly it seems to work even if we rename the JAR.  It just prints
out a warning message that it couldn't find the JAR.  Why does it check for
a JAR named aspectjrt.jar?


-----Original Message-----
From: Wes Isberg [mailto:wes@xxxxxxxxxxxxxx]
Sent: Monday, July 28, 2003 5:10 PM
To: aspectj-users@xxxxxxxxxxx
Subject: Re: [aspectj-users] aspectjrt.jar name


Right now, we do check for that name.

There can be only one version of the AspectJ runtime classes in a
namespace, so you couldn't run with a different version in any case.
But the later version is upwards-binary-compatible with the earlier
version, so you might be able to replace the Cactus library with
the one from the AspectJ 1.1 distribution.

Wes

Volkmann, Mark wrote:


Does aspectjrt.jar have to be named that?  I'd like to rename it to
aspectjrt1.1.jar to avoid conflict with the version that

Cactus uses, but

when I do that, ajc reports that it can't find the JAR.




**************************************************************
*********************

WARNING: All e-mail sent to and from this address will be

received or

otherwise recorded by the A.G. Edwards corporate e-mail

system and is

subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.


**************************************************************
**********************

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users




***********************************************************************************
WARNING:  All e-mail sent to and from this address will be received or
otherwise recorded by the A.G. Edwards corporate e-mail system and is
subject to archival, monitoring or review by, and/or disclosure to,
someone other than the recipient.
************************************************************************************




Back to the top