Re: NetBeans Module development, how to use an external jar library.
Benno Markiewicz <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.devel |
|---|---|
| Message-ID | <CAA_aP4gdfUT=ACu4V_dpUMx7ir5x5TFm7wUcFzAxwyFHyBWn9A@mail.gmail.com> |
Which kind of special logic do you want to use? I wrote some java hints too, but I never had to use tools.jar nor other wrapped jars See https://github.com/markiewb/nb-additional-hints With kind regards, markiewb 2015-11-30 11:30 GMT+01:00 -Silver- <[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. > > > > >