You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jon Skeet <jo...@peramon.com> on 2001/08/13 23:08:28 UTC

RE: custom task location ??

> Where should my custom task class file be located?

In a package :)

The error message gives you all the information you need, if you read it
carefully:

"java.lang.ClassNotFoundException: Will not load classes from the
default
package"

Jon

Re: custom task location ??

Posted by Matthew Inger <ma...@sedonacorp.com>.
T Master wrote:

>*cough*
>taskdef supports the classpath attribute.
>
>*whistles and walks away quietly before anyone notices...*
>
>
>----- Original Message -----
>From: "T Master" <tm...@iknowledgeinc.com>
>To: <an...@jakarta.apache.org>
>Sent: Monday, August 13, 2001 3:20 PM
>Subject: Re: custom task location ??
>


Bad idea.  As a general rule, you should not create classes in the 
default package
as some classloaders will barf at that.  Putting the class in a package 
will elminiate
the possibility of some classloader barfing at your task.

file in: my/package/myClass.java
--------------------------------------
package my.package;

public class myClass
{
...
}



-- 
Matt Inger (matt.inger@sedonacorp.com)
Sedona Corporation
455 S. Gulph Road, Suite 300
King of Prussia, PA 19406
(484) 679-2213
"Self-respect - the secure feeling that no one,
 as yet, is suspicious." -H.L. Mencken 




Re: custom task location ??

Posted by T Master <tm...@iknowledgeinc.com>.
*cough*
taskdef supports the classpath attribute.

*whistles and walks away quietly before anyone notices...*


----- Original Message -----
From: "T Master" <tm...@iknowledgeinc.com>
To: <an...@jakarta.apache.org>
Sent: Monday, August 13, 2001 3:20 PM
Subject: Re: custom task location ??


> That's what i figured, so i copied it everywhere :p
>
> It's a pity I can't use <classpath> in conjunction with taskdef...then it
> would have been found.
>
>
> ----- Original Message -----
> From: "Jon Skeet" <jo...@peramon.com>
> To: <an...@jakarta.apache.org>
> Sent: Monday, August 13, 2001 3:08 PM
> Subject: RE: custom task location ??
>
>
> > > Where should my custom task class file be located?
> >
> > In a package :)
> >
> > The error message gives you all the information you need, if you read it
> > carefully:
> >
> > "java.lang.ClassNotFoundException: Will not load classes from the
> > default
> > package"
> >
> > Jon
> >
>


Re: custom task location ??

Posted by T Master <tm...@iknowledgeinc.com>.
That's what i figured, so i copied it everywhere :p

It's a pity I can't use <classpath> in conjunction with taskdef...then it
would have been found.


----- Original Message -----
From: "Jon Skeet" <jo...@peramon.com>
To: <an...@jakarta.apache.org>
Sent: Monday, August 13, 2001 3:08 PM
Subject: RE: custom task location ??


> > Where should my custom task class file be located?
>
> In a package :)
>
> The error message gives you all the information you need, if you read it
> carefully:
>
> "java.lang.ClassNotFoundException: Will not load classes from the
> default
> package"
>
> Jon
>