Skip to content

ClassLoader provided to loadFromJava() is not used to when actually compiling a class #19

@renatoathaydes

Description

@renatoathaydes

Classes loaded by the classLoader provided to the CachedCompiler are not visible to the class being compiled.

For example, in OSGi, if you have a class A in a bundle, then call CachedCompiler.loadFromJava() using that bundle's class loader to compile a class which refers to A, an error occurs as A is not found.

It seems the problem is that the JavaFileManager does not use the classLoader provided to loadFromJava().

I will try to fix this and make a pull request in the next couple of days or hours.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions