Re: Easiest test case
Mark Swanson <mark-e2GstmqqWGa5mcYau+xr2AC/[email protected]>
| Newsgroups | gmane.comp.java.beanshell.devel |
|---|---|
| Organization | Web Service Solutions, Inc. |
| Message-ID | <[email protected]> |
Here are the combinations I tried. It's silly, but I was grasping at straws
and was hoping to get lucky. In any case, they all fail. Again, this problem
only occurs when using the policy file.
if (in == null)
in = getClass().getResourceAsStream(path);
//in
=this.getClass().getClassLoader().getSystemResourceAsStrea
m(path);
if (in == null) {
System.err.println("Interpreter classloader failed path:" +
path);
InputStream is =
getClass().getResourceAsStream("/bsh/commands/
printBanner.bsh");
if (is == null)
System.err.println("Failed 1 to directly load
printBanner.b
sh");
is =
getClass().getClassLoader().getResourceAsStream("/bsh/comm
ands/printBanner.bsh");
if (is == null)
System.err.println("Failed 2 to directly load
printBanner.b
sh");
is =
getClass().getResourceAsStream("bsh/commands/printBanner.b
sh");
if (is == null)
System.err.println("Failed 3 to directly load
printBanner.b
sh");
is =
getClass().getClassLoader().getResourceAsStream("bsh/comma
nds/printBanner.bsh");
if (is == null)
System.err.println("Failed 4 to directly load
printBanner.b
sh");
is =
getClass().getClassLoader().getResourceAsStream("commands/
printBanner.bsh");
if (is == null)
System.err.println("Failed 5 to directly load
printBanner.b
sh");
is =
getClass().getClassLoader().getResourceAsStream("bsh.comma
nds.printBanner.bsh");
if (is == null)
System.err.println("Failed 6 to directly load
printBanner.b
sh");
is =
getClass().getClassLoader().getResourceAsStream("printBann
er.bsh");
if (is == null)
System.err.println("Failed 7 to directly load
printBanner.b
sh");
is =
getClass().getClassLoader().getSystemResourceAsStream("bsh
/commands/printBanner.bsh");
if (is == null)
System.err.println("Failed 8 to directly load
printBanner.b
sh");
is =
Thread.currentThread().getContextClassLoader().getResource
AsStream("/bsh/commands/printBanner.bsh");
if (is == null)
System.err.println("Failed 9 to directly load
printBanner.b
sh");
}
--
VoIP SIP:[email protected]
Free calendar client and server - works with Exchange/Outlook/Yahoo!
TV-Listing and Weather Schedules
http://www.ScheduleWorld.com/
http://www.ScheduleWorld.com/sw/ScheduleWorld.jnlp (JWS)
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click