Resources.getResource not found [message #490026] |
Wed, 07 October 2009 00:27 |
|
Eclipse can't find the specified resources by
"Resources.getResource" ....
What's wrong?
This seems always happens and it's absolutely annoying.
The thing is, I even added this resource directory into my project source.
What can I do??
Best Regards
JIA
[Updated on: Thu, 08 October 2009 05:43] Report message to a moderator
|
|
|
|
Re: resources not found [message #490252 is a reply to message #490057] |
Thu, 08 October 2009 05:57 |
|
Sorry, I'm actually building and testing
j3d-examples in Eclipse 3.5.1 IDE, under WindowsXP.
Resources is actually defined as the attached file. In fact, this Resource.java file is as simple as
package org.jdesktop.j3d.examples;
import java.net.URL;
/**
*
*/
public class Resources {
/**
* Do not construct an instance of this class.
*/
private Resources() {
}
/**
* Return the URL of the filename under the resources directory
*/
public static URL getResource(String filename) {
URL url = Resources.class.getResource(filename);
return url;
}
}
I tacked into the source, it seems the function
public java.net.URL getResource(String name)
in class
can't find the resource files, which makes url in
URL url = Resources.class.getResource(filename);
always be null.
Can you please help?
Cheers
JIA Pei
|
|
|
Powered by
FUDForum. Page generated in 0.04099 seconds