users@glassfish.java.net

Re: Properties-File

From: <glassfish_at_javadesktop.org>
Date: Wed, 10 Sep 2008 00:53:41 PDT

Sorry, it was a bad posed question.
I deployed my service (with properties-file) and used
this.getClass().getClassLoader().getResource("properties-file") and
Thread.currentThread().getContextClassLoader().getResource("properties-file").
It didn't find my file. I debugged it, the classloader only searched inside the glassfish/domains/../config direction and java_home. But not in my service-files.
Now I found a solution, I take this.getClass().getResourceAsStream("properties-file"). It works fine. Thanks for your answers!!
regards
[Message sent by forum member 'jsda' (jsda)]

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