get resources mehtod returns null
That would mean that the path it was given was wrong.
Here is the output I get when I execute the code from a class file not in a package and not in a jar:
URL path=/D:/JavaDevelopment/Testing/ForumQuestions12/UrlTest.java
Directory Path= D:\JavaDevelopment\Testing\ForumQuestions12\UrlTes t.java
From inside of a jar file:
D:\JavaDevelopment\Testing\ForumQuestions12\Testin g\TestPackages>java -jar _Test2.jar
URL path=file:/D:/JavaDevelopment/Testing/ForumQuestions12/Testing/TestPackages/_Test2.jar!/Test2/UrlTest.java
Directory Path= D:\JavaDevelopment\Testing\ForumQuestions12\Testin g\TestPackages\UrlTest.java
D:\JavaDevelopment\Testing\ForumQuestions12\Testin g\TestPackages>MORE
Try fixing the path and filename
Here is how to wrap your code with code tags:
[code]
**YOUR CODE GOES HERE**
[/code]
to get highlighting and preserve formatting.