Just to clarify, I have a similar problem like this:
http://www.nabble.com/Accessing-a-file-in-AAR-to16787898.html#a16898376
but I do not understand his mentioned solution.
Should I use the getResourceAsStream(), create a temporary file from the
inputstream, get the file path und use it with my 3rd party methods?
Deepal Jayasinghe wrote:
>
>
>> 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
>
>
>
--
View this message in context:
http://www.nabble.com/access-files-inside-AAR---File-Path%21-not-Resource---URL-tp20958031p20959233.html
Sent from the Axis - User mailing list archive at Nabble.com.