axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deepal Jayasinghe" <dee...@opensource.lk>
Subject Re: [axis2] classloader poblem?
Date Wed, 25 Jan 2006 11:04:30 GMT
hmmmm ,
I have reply to this mail several time , any way the right way is this
 1. if your are trying to access the resources out side the service impl 
class , then u have to get the axisService.getClassLoader() and using that 
load ur resources
 2. if you are trying to access the property inside ServiceImpl class , then 
the way is
      getClass().getClassLoader().getResourceAsStream("myResource.resourec");

Thanks,
 Deepal
................................................................
~Future is Open~

----- Original Message ----- 
From: "Juergen Umbrich" <juergen@umbrich.net>
To: <axis-user@ws.apache.org>
Sent: Wednesday, January 25, 2006 4:28 PM
Subject: [axis2] classloader poblem?


>
> Hi
>
> i have a poblem to load a file diectly in my .aar archive.
> structure of the aar-achive
> aar
> |
> |-lib/
>    |-mypackage.jar
>           |-properties.file
>    |-loadpoperties.java
>
> in loadproperties i run the following command
>
> InputStream in =
> Thread.currentThread().getContextClassLoader().getResourceAsStream(properties.file);
>
>
> and i get in = null as result.
> as anyone an idea what happens here, and how i can solve the problem?
>
> thx
> 



Mime
View raw message