Re: i get java.lang.ClassNotFoundException wher i run my application
from JWS
On Jul 15, 4:56 am, markspace <nos...@nowhere.com> wrote:
markspace wrote:
Don't forget these classes are being built on the EDT. That might
affect how the class loaders are set. I'm just guessing here.
Or possible "JFrame" *IS* a system class that was loaded with the
bootstrap class loader?
I think that is the most likely explanation. I had
never thought of the construct you used, and the
JFrame instance seemed the most logical candidate for
use from an object, since I had not instantiated any
custom (non J2SE) object by that stage in the code.
Maybe I should do some more experiments .. (15
seconds later).
OK yeah. When I instead do..
FrameIconFromMain fifm = new FrameIconFromMain();
imageUrl = fifm.getClass().getResource(imageName);
...in my original source, the URL *is* valid.
It was me, stupidly using the J2SE core class,
that was the problem.
I am not sure of my ultimate conclusions from this,
I suspect I will continue to push the CCL for JWS
and applets unless I see a test case that fails.
But it has certainly been worth pursuing this
thread, thanks for helping clarify what the real
problem with my original example, was.
--
Andrew T.
pscode.org