[jdom-interest] Read a XML file inside a Jar

stephan.segschneider at snellwilcox.com stephan.segschneider at snellwilcox.com
Tue Mar 26 06:13:33 PST 2002


If your.xml is located in the same dir as YourClass you just use:

InputStream is = YourClass.class.getResourceAsStream("your.xml");
 
and then you can do with the stream whatever you need to do. This works fine if
you put your.xml inside a jar file.

 Cheers,
               Stephan


____________________Reply Separator____________________
Subject:    [jdom-interest] Read a XML file inside a Jar
Author: "Robert Zuidema" <rzuidema at hotmail.com>
Date:       26/03/02 13:57


I am trying to read a XML file that is inside a JAR.
Is this possible? Can someone provide a sniplet of code for this?
Thanks,
Bob Zuidema


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.co
m



----------------------------------------------------------------------
The contents of this communication are confidential to the normal user of
the email address to which it was sent.  If you have received this email
in error, any use, dissemination, forwarding, printing or copying of this
email is strictly prohibited.  If this is the case, please notify the
sender and delete this message.
---------------------------------------------------------------------- 




More information about the jdom-interest mailing list