Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Resources.getResource not found (Resources.getResource not found )
Resources.getResource not found [message #490026] Tue, 06 October 2009 20:27 Go to next message
Eclipse UserFriend

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 01:43] by Moderator

Re: resources not found [message #490057 is a reply to message #490026] Wed, 07 October 2009 02:27 Go to previous messageGo to next message
Eclipse UserFriend
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 01:57 Go to previous message
Eclipse UserFriend
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: Fri Jul 04 09:10:05 EDT 2025

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

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

Back to the top