code: public void activateResourceProtocol ()
      {
          // set up a URL handler so that things can be loaded via urls with the 'resource' protocol
          try {
              AccessController.doPrivileged(new PrivilegedAction<Void>() {
                  public Void run () {
                      Handler.registerHandler(ResourceManager.this);
                      return null;
                  }
              });
          } catch (SecurityException se) {
              log.info("Running in sandbox. Unable to bind rsrc:// handler.");
          }
      }
docs: Registers a protocol handler with URL to handle <code>resource:</code> URLs. The URLs take
  the form: <pre>resource://bundle_name/resource_path</pre> Resources from the default bundle
  can be loaded via: <pre>resource:///resource_path</pre>