[forge-users] ClassLoading - how to make every class (in the visited project) accessible ?
ggastald at redhat.com
Wed Feb 25 11:22:44 EST 2015
What do you mean by "P2 classpath"?
By all means, see if this addon helps you out:
On 02/25/2015 01:13 PM, forge-users at lists.jboss.org wrote:
> The context is using one's own addon in a second project. Say this addon manipulates all the @Path classes
> As I was playing with code generation, I faced issues while trying to do Class.forName() because the addon has no knowledge of P2 classpath.
> What I did is infer the file path of the sources and then use Roaster to get a JavaInterface.
> But now, if I wanted to introspect (the java.lang.reflect way) a class declared in a dependency of this second project (like a class defined in twitter4j for example), how would I do ?
> Should I loop on all JARs in the visited project then loop on all the JAR's .class entries and tell the classloader to load them ?
> And same for target/classes ?
> Or is it a special classloader that I haven't found ?
> Posted by forums
> Original post: https://developer.jboss.org/message/920001#920001
> forge-users mailing list
> forge-users at lists.jboss.org
More information about the forge-users