where do you put the file that you want to read and how do you reference it 
in the code? it should work (done it in several apps) so this is most 
likely the problem.

robert

At 18:55 10.11.00 , you wrote:
>Unfortunately this doesn't help :-(( Anyone could advice me smth?
>
>Egor Savotchkin
>>----- Original Message -----
>>From: <mailto:[EMAIL PROTECTED]>Tony Wiegand
>>To: <mailto:[EMAIL PROTECTED]>Orion-Interest
>>Sent: Wednesday, November 08, 2000 8:36 PM
>>Subject: Re: orion classloader?
>>
>>
>>     I'm not sure if this will fix your problem, but try getting
>>    the classloader from the thread.
>>
>>       Thread.currentThread().getContextClassLoader();
>>
>>
>>
>>Savotchkin Egor wrote:
>>>Hi all,     I needed to load property files on my own without 
>>>ResourceBundle class because the latter does a lot of caching which I do 
>>>not need. So I copied the code from ResourceBundle class where property 
>>>files are loaded and included it in my application. The problem is all 
>>>this thing works if I start orion by java 
>>>com.evermind.server.ApplciationServer and does not work in case of java 
>>>-jar orion.jar. Is this because of different classloaders or something 
>>>else? The code is: class MessageResources {...    private static 
>>>ClassLoader getLoader() {
>>>         ClassLoader cl = MessageResources.class.getClassLoader();
>>>         if (cl == null) {
>>>             cl = ClassLoader.getSystemClassLoader();
>>>         }
>>>         return cl;
>>>     } private InputStream loadResourceAsStream(final String resName) {
>>>         final ClassLoader loader = getLoader();
>>>         InputStream stream = 
>>> (InputStream)java.security.AccessController.doPrivileged(
>>>             new java.security.PrivilegedAction() {
>>>                 public Object run() {
>>>                     if (loader != null) {
>>>                         return loader.getSystemResourceAsStream(resName);
>>>                     } else {
>>>                         return 
>>> ClassLoader.getSystemResourceAsStream(resName);
>>>                     }
>>>                 }
>>>             }
>>>         );
>>>         return stream;
>>>     }..}

(-) Robert Krüger
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665401, Fax: 06151 665373
(-) [EMAIL PROTECTED], www.signal7.de


Reply via email to