> Yes, I tried this, but there is still the problem, that I need a file Path
> and not a resource/URL to invoke File file = new File(file Path) for further
> operations.
>
> and this was not a solution to get the correct Path:
> getClass().getClassLoader().getResource("conf/config.xml").getPath();
>
>
> if(!file.exists()) {...system.out
>   
I do not think you can do something like this,
What you can do is get the input stream and read it and do your job.

If you get not-null value for getResource(), then that is mean you can
access your resource.

Thank you!
Deepal
> brought me this:
> cannot find file
> file:/C:/Programme/Tomcat/work/Catalina/localhost/axis2/_axis2/axis230466Service.aar!/conf/config.xml
>
>
>
>
>
> Deepal Jayasinghe wrote:
>   
>> Have a look at following article, which provides a way to access your
>> resources inside the service archive file.
>>
>> http://wso2.org/library/259
>>
>> Deepal
>>     
>>> I have an unsolved problem accessing a file which is inside my
>>> aar-folder.
>>> Unfortunately I need a file Path for a 3rd Party function and not a
>>> Resource
>>> or an URL. Do you have any advices how to get the right path to the file?
>>>
>>> My folder structure is like this
>>>
>>> /META-INF
>>> /bin (Service classes)
>>> /conf/config.xml
>>>
>>>
>>>
>>>   
>>>       
>> -- 
>> Thank you!
>>
>>
>> http://blogs.deepal.org
>>
>>
>>
>>     
>
>   

-- 
Thank you!


http://blogs.deepal.org

Reply via email to