you can call getResourceAsStream on any Class object:
MyBeanImpl.class.getResourceAsStream("/some/path/to/my.properties");
-danch
Toby Allsopp wrote:
>
> Jim Archer wrote:
>
> > Hi Toby...
> >
> > --On Friday, April 20, 2001 2:53 PM +1200 Toby Allsopp
> > <[EMAIL PROTECTED]> wrote:
> >
> >> You can put your properties file in the same place as your classes and
> >> then access it using getClass().getClassLoader().getResourceAsStream().
> >> You could pass the resulting InputStrean to Properties.load.
> >
> >
> > Thats a great trick! Can I do this from a SLSB and if so, would that be
> > portable?
>
> I can't see why not, although I think there is a restriction on EJBs
> obtaining ClassLoaders. If you can figure out a way to do it that
> doesn't explicitly deal with ClassLoaders then it should be portable.
>
> Toby.
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
Confidential e-mail for addressee only. Access to this e-mail by anyone else is
unauthorized.
If you have received this message in error, please notify the sender immediately by
reply e-mail
and destroy the original communication.
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user