Well, I am not absolutely sure about it, but this might be the way: You said that your war is in an ear. Try, if you can access a file in your ear this way. If yes, getResource(" to your war") and work away on the returned url.
I know that this is after your deadline, but just as a matter of interest. Will you let us know if it worked?
Best regards, Petr
Get a better web browser:<br /><a href="http://www.mozilla.org/products/firefox/switch.html" target="_blank" rel="nofollow">http://www.mozilla.org/products/firefox/switch.html</a>
My impression was that it was the Applet that was trying to load the txt file from the SystemClassLoader, and the applet security rules would certainly stop this from happening. I would have expected a SecurityException rather than a null return value though.
subject: reading a .txt file from systemclassloader