Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I load an Image resource in a ClassLoader?

807591Apr 1 2008 — edited Apr 4 2008
Im using a ClassLoader (I have done a manual coding for this ClassLoader.) for loading a class UserLogin.class other than default System ClassLoader.
In that UserLogin.class, im using an image */utils/New.gif* for the button and i use getclass().getResource("/utils/New.gif") to point out the image file. And I dont want any other method to be used for pointing out the image.

So My ClassLoader (manual coding) searching for the image resource which actually doesn't available in it.

I want the resource to be loaded in my ClassLoader.
if some one knows it how, pl give me the coding for loading the resource files into the Manual ClassLoader.

*"How do I load an Image resource in a ClassLoader?"*


Thanks & Regards,
Selvaprabhu
9840033744
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 2 2008
Added on Apr 1 2008
21 comments
1,252 views