vscode-java icon indicating copy to clipboard operation
vscode-java copied to clipboard

How to identify the usage of com.sun.source.* packages in a project

Open liuhaoduoduo opened this issue 3 weeks ago • 0 comments

My project is a legacy Java 8 application that relies on com.sun.source.* packages. Although I have configured the language extension to use JDK 25, the code referencing com.sun.source.* still shows red squiggly lines (errors) when I open the source files. I have already applied the following configuration:

Image "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m --add-exports=jdk.compiler/com.sun.source.tree=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.source.util=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"

liuhaoduoduo avatar Nov 20 '25 09:11 liuhaoduoduo