Skip to content

Investigate com.sun.tools.classfile usage #9368

@mbien

Description

@mbien

JDK 25+ doesn't have the com.sun.tools.classfile package anymore (since it got replaced by the public classfile-api), compare:

symptom: Noticed this while observing startup warnings:

WARNING: package com.sun.tools.classfile not in jdk.jdeps

so, why does it not explode at runtime? nb-javac ships it. Where does it get it from when it is lo longer in the JDK? It is copied from nb-javac 21 (!) producing a frankenstein javac:

https://github.com/JaroslavTulach/nb-javac/blob/50889546cfec421fbfc85158332cede5522d3af2/make/langtools/netbeans/nb-javac/build.xml#L202-L208

https://github.com/JaroslavTulach/nb-javac/blob/50889546cfec421fbfc85158332cede5522d3af2/make/langtools/netbeans/nb-javac/build.xml#L313

JaroslavTulach/nb-javac@2781c00

NB usage is only via classfile/CodeGenerator and some Strings:
https://github.com/search?q=repo%3Aapache%2Fnetbeans%20com.sun.tools.classfile&type=code

Would be good to try to remove usage within NB and remove it from nb-javac too or switch to JEP 484 somehow (hopefully without having to ship it with nb-javac since that would likely no longer be possible for several reasons).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Code cleanupLabel for cleanup done on the Netbeans IDEJava[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)nb-javacRun nb-javac integration tests

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions