Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] robocode and AspectJ

Hi -

I looked at this briefly.  It looks like you have to put
all classes in the robot jar, including any library classes
like aspectjrt.jar.  (It doesn't have anything to do with
aspects per se, just external libraries.)

robocode.security.RobocodeClassLoader is responsible for
loading robots, and does not delegate upwards (in violation
of Java's classloader rules).  Further, it limits robot
classpaths to a single entry.  

As a result, one has to include all the classes required by
any robot in the robot jar.  It is not enough to refer to
them in the jar manifest or to include them on the robot
classpath or the system class path when loading
robocode.Robocode.

I didn't find this answer in the robocode faq or wiki or
api, but you can find RobocodeClassLoader.java in CVS if
you want. 

Wes


On Sun, 02 Jul 2006 23:03:24 +0200
 Oliver Böhm <boehm@xxxxxxxxxx> wrote:
> Hi,
> 
> I want to use robocode (http://robocode.sourceforge.net/)
> for some
> examples with AspectJ in my lecture. When I build a robot
> with some
> aspects I got some errors from robocode that some classes
> from
> apsectjrt.jar are missing. Unfortunately robocode seems
> to use its own
> classloader to load my robot - I guess this is the reason
> for the
> ClassNotFoundException.
> 
> Question: has anybody used robocode together with
> AspectJ?
> 
> kind regards
> Oliver
> -- 
> Oliver Böhm
> http://www.javatux.de
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top