NetBeans Module development, how to use an external jar library.

"-Silver-" <[email protected]>
Newsgroups gmane.comp.java.netbeans.devel
Message-ID <[email protected]>
Hi, I'm developing a NetBeans module to have a customized Java hint but I have some problem to use the Java library Java\jdk8\libs\tools.jar that I need to parse the code.
In particular I need to use the com.sun.tools.javac.tree.JCTree.JCAssignOp class to manage the cases in which the code contains the  +=    -=    *=    /=   assignment operators.
This library can not be added to my Netbeans module project using ProjectProperties -> Libraries -> Module Dependencies (or at least I did't find it) and if I add it using ProjectProperties -> Libraries -> Wrapped JARs I can compile and run my module but it seems that the lib is loaded using a different ClassLoader so I have a ClassCastException when I try to cast a JCTree also if the cast is valid (and JCTree objects are not recognized when I use the instanceof operator).

Could you kindly give me any hint about how I could solve this issue?

Thanks in advance,
best regards.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.