Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.
This repository was archived by the owner on Dec 23, 2023. It is now read-only.

java.lang.NoClassDefFoundError: com/sun/tools/javadoc/Main with modern JDK #72

@djeang

Description

@djeang

Description

Calling componentFinder.findComponents() for scanning source code scan source code, throws following error :

java.lang.NoClassDefFoundError: com/sun/tools/javadoc/Main
    at com.structurizr.analysis.SourceCodeComponentFinderStrategy.runJavaDoc (SourceCodeComponentFinderStrategy.java:126)
    at com.structurizr.analysis.SourceCodeComponentFinderStrategy.afterFindComponents (SourceCodeComponentFinderStrategy.java:64)
    at com.structurizr.analysis.ComponentFinder.findComponents (ComponentFinder.java:81)

This has been prodiced using JDK 17 & 21 (I need yhose as I use structurizr-dsl) instead

Steps to reproduce

ComponentFinder componentFinder = new ComponentFinder(container, "com.mycompany",
                new SourceCodeComponentFinderStrategy("src/main/java" 150),
                new SpringComponentFinderStrategy(
                        new ReferencedTypesSupportingTypesStrategy()
                )
        );
componentFinder.findComponents();

Execute this code using JKD 17 or higher (tested with both temurin and Oracle openJdk)

Screenshot

No response

Code sample

No response

Configuration

No response

Severity

Critical

Priority

I have no budget and there's no rush, please fix this for free

More information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions