You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-user@jakarta.apache.org by Abel Wang <ab...@nvisionsoftware.net> on 2002/06/18 05:24:06 UTC
JavaClass to Class
Hi BCEL users, I've been playing around with BCEL for a while now and was
wondering if there's any way for me to go from a java.lang.Class object into
a JavaClass object, and the other way around too.
Basically, I'm trying to dynamically change some class files that are being
loaded by a vendor specific class loader (one that doesn't get the class
from the system's class path). Since the .class files are not in the class
path, I was wondering if I could create a JavaClass object from the
java.lang.Class object directly.
Thanks,
--Abel
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: JavaClass to Class
Posted by Juozas Baliuka <ba...@centras.lt>.
try to find resource by class name:
clazz.getClassLoader().getResourceAsStream(clazz.getName().replace('.','/')
+ ".class");
> Hi BCEL users, I've been playing around with BCEL for a while now and was
> wondering if there's any way for me to go from a java.lang.Class object
into
> a JavaClass object, and the other way around too.
>
> Basically, I'm trying to dynamically change some class files that are
being
> loaded by a vendor specific class loader (one that doesn't get the class
> from the system's class path). Since the .class files are not in the
class
> path, I was wondering if I could create a JavaClass object from the
> java.lang.Class object directly.
>
> Thanks,
>
> --Abel
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>