JDK-8294975 : Convert jdk.compiler javac to use the Classfile API for reading and writing classes
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Priority: P4
  • Status: Closed
  • Resolution: Rejected
  • Submitted: 2022-10-07
  • Updated: 2025-05-16
  • Resolved: 2025-05-16
Description
```bash
 jdk.compiler$ find ./ -type f -name '*.java' | xargs grep -w -l 'com.sun.tools.classfile'
```
Here's the list:
jdk/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TargetType.java
jdk/src/jdk.compiler/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java

All the usage of 'com.sun.tools.classfile' are in comments
Comments
We decide not to update javac; simply using the Class-File API provides little value, and we look for a more general structural revamp in the compiler.
16-05-2025

`jdk.compiler` module does not use `com.sun.tools.classfile` but its own class reading and writing facility mainly stored in `com.sun.tools.javac.jvm` package.
29-08-2023