Reading an XML in a differnt jar

Discussion in 'Java' started by merfh3, Feb 1, 2011.

  1. merfh3

    merfh3

    Joined:
    Feb 1, 2011
    Messages:
    1
    Likes Received:
    0
    This is an odd scenario, but i need to access an xml that is stored in a different jar file that the one that contains the java code that needs the xml.

    Everywhere I look, i keep seeing code like this:getClass().getClassLoader().getResourceAsStream("/path/file.xml"); But that only works if you are pulling from the same jar file that the java came from. Anyone have any ideas?
     
    merfh3, Feb 1, 2011
    #1
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.