Re: Strange ClassCastException: A puzzle for Java/ImageJ experts to help me wit?.
Posted by
Bill Mohler on
URL: http://imagej.273.s1.nabble.com/Strange-ClassCastException-A-puzzle-for-Java-ImageJ-experts-to-help-me-wit-tp3692688p3692699.html
For this line:
IJ.log(" "+ Class.forName("MultiQTVirtualStack").getClass().getClassLoader() );
I get "null" printed.
>Hi,
>
>On Wed, 29 Apr 2009, Bill Mohler wrote:
>
>> Dscho, thanks for the suggestion, but I seem to be able to figure out
>> how to work your request for stack.getClass().getClassLoader() (I can't
>> figure a way to get the class loader for mqtvsClass...)
>>
>> Here's what prints for stack.getClass().getClassLoader():
>> ij.io.PluginClassLoader@798928
>
>Okay, that is what I expected.
>
>For the other class, you might want to try a "Class.forName()" invocation,
>or even better, just create an instance right there, and get the active
>class loader for that one.
>
>Ciao,
>Dscho