Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Resources.getResource not found (Resources.getResource not found )
Resources.getResource not found [message #490026] Wed, 07 October 2009 00:27 Go to next message
JIA Pei is currently offline JIA PeiFriend
Messages: 49
Registered: September 2009
Member


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 #490057 is a reply to message #490026] Wed, 07 October 2009 06:27 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
JIA Pei wrote:
> Eclipse can't find the specified resources by
>
> "Resources.getResource" ....
> What's wrong?

I don't find this Resources class in SDK. Provided by 3rd party library?

- Prakash

Platform UI Team, IBM
http://blog.eclipse-tips.com
Re: resources not found [message #490252 is a reply to message #490057] Thu, 08 October 2009 05:57 Go to previous message
JIA Pei is currently offline JIA PeiFriend
Messages: 49
Registered: September 2009
Member

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

java.lang.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
Previous Topic:breakpoints in java debug aren't working
Next Topic:[CVS] undo "Mark as Merged"
Goto Forum:
  


Current Time: Tue Apr 23 09:54:34 GMT 2024

Powered by FUDForum. Page generated in 0.03390 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top