RE: How to read property files?

2001-04-21 Thread Wouter Boers
- From: Mark [mailto:[EMAIL PROTECTED]] Sent: 18 April 2001 16:08 To: [EMAIL PROTECTED] Subject: Re: How to read property files? > > InputStream is = this.getClass().getResourceAsStream("myapp.properties"); > Properties p = new Properties(); > try

Re: How to read property files?

2001-04-18 Thread estutes
d up > > Filip > > ~ > Namaste - I bow to the divine in you > ~ > Filip Hanik > Software Architect > [EMAIL PROTECTED] > www.filip.net > >> -Original Message- >> From: Samson, Lyndon [IT] [mailto:[EMAIL PROTECTED]] >> Sent: Wednesday, Apri

RE: How to read property files?

2001-04-18 Thread Filip Hanik
in you ~ Filip Hanik Software Architect [EMAIL PROTECTED] www.filip.net > -Original Message- > From: Samson, Lyndon [IT] [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, April 18, 2001 8:30 AM > To: [EMAIL PROTECTED] > Subject: RE: How to read property files? > > > M

RE: How to read property files?

2001-04-18 Thread Samson, Lyndon [IT]
don [IT]" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 10:42 AM Subject: RE: How to read property files? > Works fine for me? My jar file had a manifest, a class ( default package ) > and a properties file. I added the jar to the CLASSPATH and execu

Re: How to read property files?

2001-04-18 Thread Mark
uot; <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 10:42 AM Subject: RE: How to read property files? > Works fine for me? My jar file had a manifest, a class ( default package ) > and a properties file. I added the jar to the CLASSPATH and executed the >

RE: How to read property files?

2001-04-18 Thread Samson, Lyndon [IT]
- From: Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 18, 2001 3:08 PM To: [EMAIL PROTECTED] Subject: Re: How to read property files? > > InputStream is = this.getClass().getResourceAsStream("myapp.properties"); > Properties p = new Properties(); > try

Re: How to read property files?

2001-04-18 Thread Sam Newman
able. sam - Original Message - From: "Mark" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 3:08 PM Subject: Re: How to read property files? > > > > InputStream is = > this.getClass().getResourceAsStream("myapp.properties

Re: How to read property files?

2001-04-18 Thread Mark
> > InputStream is = this.getClass().getResourceAsStream("myapp.properties"); > Properties p = new Properties(); > try { > p.load(is); > } catch ( java.io.IOException e ) { > // Can't load props file > } > > That way the properties file can be anywhere in the classpath. > > Have

RE: How to read property files?

2001-04-18 Thread Randy Layman
[EMAIL PROTECTED]] > Sent: Wednesday, April 18, 2001 9:25 AM > To: [EMAIL PROTECTED] > Subject: Re: How to read property files? > > > Thanks, this helps me. > I was wondering though, can you determine where it found the > properties > file at? > Thanks. > -jim >

Re: How to read property files?

2001-04-18 Thread Sam Newman
t;Jim Willeke" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, April 18, 2001 2:25 PM Subject: Re: How to read property files? > Thanks, this helps me. > I was wondering though, can you determine where it found the properties > file at? > Thanks. > -jim >

Re: How to read property files?

2001-04-18 Thread Jim Willeke
Thanks, this helps me. I was wondering though, can you determine where it found the properties file at? Thanks. -jim Samson, Lyndon [IT] wrote: > This works a treat for me > > InputStream is = this.getClass().getResourceAsStream("myapp.properties"); > Properties p = new Properties(); > t

RE: How to read property files?

2001-04-18 Thread Samson, Lyndon [IT]
This works a treat for me InputStream is = this.getClass().getResourceAsStream("myapp.properties"); Properties p = new Properties(); try { p.load(is); } catch ( java.io.IOException e ) { // Can't load props file } That way the properties file can be anywhere in the classpath.

Re: How to read property files?

2001-04-18 Thread Sam Newman
Could you get the resource URL of the class loading the properties file, and then strip off the package and class name? e.g. if Im loading bob.properties from class Bob in package com/fred/, my resource url for the class would be /usr/tomcat/webapps/mycontext/WEB-INF/classes/com/fred/Bob.class. If