[jboss-user] [Beginner's Corner] - how to access the file present in jar file in jboss-5.0.0 GA
Sheetal Chauhan
do-not-reply at jboss.com
Mon Jul 11 08:25:56 EDT 2011
Sheetal Chauhan [http://community.jboss.org/people/se.sheetal] created the discussion
"how to access the file present in jar file in jboss-5.0.0 GA"
To view the discussion, visit: http://community.jboss.org/message/614416#614416
--------------------------------------------------------------
Hi all,
I am facing a problem and unable to get any solution if any one of you can help me out.
I am upgrading from jboss4.2.3 to jboss 5.0.0 GA and while deploying my ear i am getting null pointer exception.
In my ear I have a jar file, which contains a properties file say myFile.properties and I want to access this file in one of my java class which is also thr in the jar in pkg something like abc\efg\pkg1\pkg2\xyz.java.
InputStream input = XYZ.class.getResourceAsStream("/myFile.properties");
Here m getting a input as null.
I guess its something related to classloaders :-( , the same thing works fine with jboss4.2.3.
please provide your valuable solution and let me know in case any more info is reqd.
Thanks in advance.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/614416#614416]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110711/202fcf9a/attachment.html
More information about the jboss-user
mailing list