Submitted On 13-FEB-2001
AndyBaxman
This is a real pain! I'm using URLClassLoader to implement
an Applet container. Trouble is, Applets that are Jar'd and
use getResource are not portable to custom Applet viewers
that use URLClassLoader! Anyone have any workarounds at all?
Submitted On 30-APR-2001
topcoMP
will it be fixed in any 1.3.x release ???
Submitted On 31-OCT-2002
gopeshgarg
This issue is happening again with 1.3.1_04 and above.
Submitted On 04-DEC-2002
leon.chadwick
I have found this behaviour in jdk1.2, 1.3 and 1.4.1_01.
It is intermittent, i.e. the same code could work one day and
not the next. The only workaround (and I only say this to
help you sun people find and fix it), is to put your jar onto the
bootclasspath, e.g. -Xbootclasspath/p:mycode.jar on the
java command line. However that causes all sorts of other
repercussions (though at least getResource() stops returning
null).
Please fix this sun!!
leonchadwick@traderisks.com
Submitted On 06-DEC-2002
leon.chadwick
I have FOUND the solution (at least to why it happened for
me)!!
The ClassLoader that loads files from the Windows filesystem
is not case sensitive, however the .jar based classloader is.
Ensure that the filename of the file you want via getResource
() is exactly the same case as the actual string you pass into
getResource().
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|