users@glassfish.java.net

Re: Creating system variables and accessing them in applications

From: <glassfish_at_javadesktop.org>
Date: Fri, 16 Mar 2007 14:34:31 PST

So far, I've found that if you put a file in your $domain/lib/classes folder, you can access it via YourClass.class.getClassLoader().getResourceAsStream();

Once you do that, you do whatever you like with that stream.

Properties myProps = new Properties();
myProps.load(this.getClass().getClassLoader().getResourceAsStream("/app.properties"));
[Message sent by forum member 'whartung' (whartung)]

http://forums.java.net/jive/thread.jspa?messageID=208521