wood burning stoves*
The moose likes Java in General and the fly likes getClass().getResource() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "getClass().getResource()" Watch "getClass().getResource()" New topic
Author

getClass().getResource()

Dhana Muthu
Greenhorn

Joined: Nov 15, 2003
Posts: 2
Hi.....
I would like to use the getClass().getResource() inside a static method, which is basically a utility method.. But i'm getting non-static referece compilation error..
Any fixes ??
dhana
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
Hi Dhana
Try this,

Regards
Maulin
Dhana Muthu
Greenhorn

Joined: Nov 15, 2003
Posts: 2
Yeah... i tried same kind of code and it worked...
Thanks .....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getClass().getResource()
 
Similar Threads
how to load a png-file?
getResource() from a static context
My app uses a .txt file to retreive a list of usernames and passwords, can I jar it?
KeyEvent Problem
problem loading images