Actually, no package==root directory. That means that a class with no package (or
more accurately, a class in the default package) could be located in any of the
directories or jar files listed in the classpath but not in any sub-directory of
those places. It happens that the current directory is usually in the classpath so
your response is partly right. Its still important for a Java bean to be placed in
a package to avoid name space conflicts with other libraries.



Carsten Heyl wrote:

> Hi Hong,
>
> put it in a package. No package==current directory.
> How many current directories can you have.
>
> >Hi, all:
> >
> >    I'm trying to load a bean class using "Class.forName(beanClass)" for
> >introspection in a servlet. It's working as long as bean classes are placed
> >in the root directory of servlet. In my case, the servlet directory is
> >c:\WebSphere\AppServer\Servlets ( I'm on Windows NT 4.0 and using IBM
> >WebSphere v2.0). If I put class files in somewhere else, for example,
> >c:\BeanLib, there will be a ClassNotFoundException. I did not package any
> >beans. I set the classpath in both System and user level to include
> >c:\BeanLib, still the same problem.
> >
> >   Any help or hint will be greatly appreciated.
> >
> >
> >Hong Zhang
> >
> >===========================================================================
> >To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST"
> .
> >FAQs on JSP can be found at:
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
>
> Ciao,
>         Carsten Heyl
>
>   Carsten Heyl                          [EMAIL PROTECTED]
>   NADS - Solutions on Nets              http://www.nads.de/
>   NADS GmbH                             http://www.pixelboxx.de/
>   Hildebrandtstr. 4E                    Tel.: +49 211 933 02-90
> D-40215 Duesseldorf                     Fax.: +49 211 933 02-93
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to