Loading xml files from jars at the runtime [message #334750] |
Thu, 26 February 2009 00:24  |
Eclipse User |
|
|
|
Hi,
I want to know if there is any mechanism by which i can load a xml file
,which is inside a jar,at the runtime.
Also my requirement is ,i dont know the name of the jars which contain xml
files,as it gets resolved at the runtime and want all the jars in the path
(known external directory)to be picked at runtime.
Is there any way to do this?
-sheela
|
|
|
Re: Loading xml files from jars at the runtime [message #334765 is a reply to message #334750] |
Thu, 26 February 2009 09:55  |
Eclipse User |
|
|
|
Typically you'd know what class it was stored relative to and you'd use
java.lang.Class.getResourceAsStream. ClassLoader has similar methods...
Sheela wrote:
> Hi,
>
> I want to know if there is any mechanism by which i can load a xml
> file ,which is inside a jar,at the runtime.
> Also my requirement is ,i dont know the name of the jars which contain
> xml files,as it gets resolved at the runtime and want all the jars in
> the path
> (known external directory)to be picked at runtime.
> Is there any way to do this?
>
> -sheela
>
|
|
|
Powered by
FUDForum. Page generated in 0.03577 seconds