Are you using the class loader which brought you in? I have found that
sometimes (and I don't know all the rules because it has to do with the
wonderful sandbox security stuff), you have to do something along the lines
of:
// Try the system path first
URL WrkURL =
getClass().getClassLoader().getSystemResource(WrkName);
// If not there, then look on the resource path (we are in a
.JAR)
if (WrkURL == null)
{
WrkURL = getClass().getClassLoader().getResource(WrkName);
}
Like I said, I don't know the whys and wherefors, I just know this works.
(for me at least!)
----- Original Message -----
From: "Rickard �berg" <[EMAIL PROTECTED]>
To: "jBoss Developer" <[EMAIL PROTECTED]>
Sent: Monday, August 21, 2000 12:13 AM
Subject: Re: [jBoss-Dev] Ah well
Hi!
Andy Abate wrote:
> Did you set the URL to be something like "jar:file://myfile.jar"? I am
> working on exactly this sort of thing (to show load progress for a
> commercial application) and it is working fine for me. I subclassed
> URLClassLoader to ensure the URL I created had the jar: on it.
I could get this to work for classes, but not resources. I.e.
cl.loadClass() is ok (doesn't lock jar), but cl.findResource() locks it.
Any idea?
/Rickard
--
Rickard �berg
Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com
-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com