Re: JAXB under Netbeans 8.1
Damian Carey <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.openide.devel |
|---|---|
| Message-ID | <CA+QCaff7xLgGLigJHNHibyHYJOra_x7EzdzR5jMTqrfng+NF7g@mail.gmail.com> |
Hi
You perhaps could try this swifty to magically make everything available ...
ClassLoader existing = Thread.currentThread().getContextClassLoader();
ClassLoader systemClassLoader =
Lookup.getDefault().lookup(ClassLoader.class);
Thread.currentThread().setContextClassLoader(systemClassLoader);
try {
// do your JAXB thing
} finally {
Thread.currentThread().setContextClassLoader(existingClassLoader);
}
On 3 February 2016 at 05:24, ctajuggler <[email protected]> wrote:
> Hi,
>
> I have a netbeans platform application project which requires
> marshalling/unmarshalling java classes to/from xml. I am using the JAXB
> interface to acheive this. My application has three modules.
>
> Does anyone know if it's possible to marshall a class in module A that is
> an extension of an abstract class in module B?
>
> The critical line in a marshalling operation would be something like:
>
> String packageList = "moduleB.abstractclasspackage";
>
> JAXBContext context = JAXBContext.newInstance(packageList,
> moduleAClass.class.getClassLoader());
>
> I'm basically having trouble getting the dependencies listed correctly in
> packageList.
>
> Thanks
>
>
>
>
>