You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Christian Andersson <ca...@ofs.no> on 2003/09/29 10:27:11 UTC

problem with using

Hi there, I'm not sure if I should post this here, or in a jelly 
mailinglist or in a ant mailinglist, so I'm doing it here, and hope you 
forgive me...

I have some classes that generate code for me, this classes I have 
previosly been using by calling executing "java" from a bat file,now I 
want to integrate these classes in maven...

sofar all is good, I've managed to locate everything I need except that 
I get one error, and I'm not sure why I get this..

I'm trying to use replication in my classes and what I'm doing is simply 
the following..

String className = "my.package.class"
Class c = Class.forName(className);
c.getPackage().getName()

ie I'm trying to get the name of the package (this works as it should on 
windows with the same java version and running from a bat file)

however, using the <java maven tag I get a NullPointerException in the 
c.getPackage().getName() call..

c.getPackage() is returning null..

is this a problem with the classloader that the <java tag uses?
can I change the classloader for the <java tag? so that it uses the 
system classloader? (I searched ant/maven/jelly but I did not find out 
anything about classloader and <java tag/task...

I'm sorry if this is not maven related, but ant/jelly related..

/Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org