Skip to content

KSP2 Generated .class files are not added to the classpath #2365

@dstepanov

Description

@dstepanov

I'm trying to migrate Micronaut to use use Kotlin 2 and KSP2.

I see the files are generated but classes cannot be loaded by Class.forName.

Do you have any idea what can be wrong?

Reading the class as file getClass().getClassLoader().getResource(className.replace('.', '/').concat(".class")) doesn't work. It looks like classes are not included on the classpath but the resources are added.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions