You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to identify the usage of com.sun.source.* packages in a project #4262
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:
What build tool does the legacy application use? Maven/Gradle/Ant/something else? Nothing? My understanding is that you're able to target an older release with a newer JDK, but you should configure the project's build tool so that it knows to treat the code as Java 8 code. vscode-java should pick up the version of Java to use from the build tool if you use Maven or Gradle, but if you use something else, it'll require more effort to get that configured.
This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.
Activity
datho7561 commentedon Jun 17, 2026
What build tool does the legacy application use? Maven/Gradle/Ant/something else? Nothing? My understanding is that you're able to target an older release with a newer JDK, but you should configure the project's build tool so that it knows to treat the code as Java 8 code. vscode-java should pick up the version of Java to use from the build tool if you use Maven or Gradle, but if you use something else, it'll require more effort to get that configured.
github-actions commentedon Jul 18, 2026
This issue has been closed automatically because it needs more information and has not had recent activity. Please reach out if you have or find the answers we need so that we can investigate further.