users@glassfish.java.net

Re: properties file in EAR

From: <glassfish_at_javadesktop.org>
Date: Tue, 19 Aug 2008 01:46:48 PDT

Hello Marina,

Thanks for the reply.
I just tried it but couldn't get the properly to load.
I have tried several ways:

[code]
Properties props = new Properties();
1. props.load(ClassLoader.getSystemResourceAsStream("common.properties"));
2. props.load(this.getClass().getClassLoader().getResourceAsStream("common.properties"));
// this would look in the same package as the class but I tried it anyway
3. props.load(this.getClass().getResourceAsStream("common.properties"));
[/code]

Also tried loading "lib/common.properties" but also doesn't work :(
[Message sent by forum member 'marlor' (marlor)]

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