title: getClassLoader().getResource() returns null
body: <p>I have this test app:</p>
  
  <pre><code>import java.applet.*;
  import java.awt.*;
  import java.net.URL;
  public class Test extends Applet
  {
  
      public void init()
      {
          URL some=Test.class.getClass().getClassLoader().getResource("/assets/pacman.png");
          System.out.println(some.toString());
          System.out.println(some.getFile());
          System.out.println(some.getPath());
  
      }
  }
  </code></pre>
  
  <p>When I run it from Eclipse, I get the error:</p>
  
  <pre><code>java.lang.NullPointerException
      at Test.init(Test.java:9)
      at sun.applet.AppletPanel.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  </code></pre>
  
  <p>Classpath (from .CLASSPATH file)</p>
  
  <pre><code>&lt;classpathentry kind="src" path="src"/&gt;
  </code></pre>
  
  <p>In my c:\project\src folder, I have only the Test.java file and the 'assets' directory which contains pacman.png.</p>
  
  <p>What am I doing wrong and how to resolve it?</p>