DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=28779>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=28779 Problem reading resource from jar-file Summary: Problem reading resource from jar-file Product: Ant Version: 1.5 Platform: PC OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: Other AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] My java-application uses some XML-files as resources. I use ANT to create the jar file but the resource is null when I access it from within my application. Sample code: InputStream is = getClass().getResourceAsStream( "myFile.xml" ); The above call to getResourceAsStream() returns null. The referred java class-file lies in the same dir as the xml-file in the jar. When I use JBuilder to build the jar file, the code works fine. I have tried to turn compress on and off. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]