structurizr / java-extensions

Structurizr for Java extensions
Apache License 2.0
39 stars 23 forks source link

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

Open djeang opened 9 months ago

djeang commented 9 months ago

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

simonbrowndotje commented 9 months ago

See https://github.com/structurizr/java-extensions/discussions/69 ... I have no plans to update this library at this time I'm afraid.