Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDK management is a real headache. #3959

Open
sigeshuo opened this issue Feb 26, 2025 · 1 comment
Open

JDK management is a real headache. #3959

sigeshuo opened this issue Feb 26, 2025 · 1 comment
Labels

Comments

@sigeshuo
Copy link

The management of the JDK is quite chaotic—there’s a difference between the runtime JDK and the JDK that the project actually requires, and it's unclear how to configure them properly. It is recommended that the extension directly support selecting both the JDK used at runtime by the extension and the JDK needed for building or running the project. Please take a look at how JetBrains IDEA handles this; otherwise, the core JDK environment in the development setup will become very cumbersome to manage.

@rgrunber
Copy link
Member

In most cases, users won't need to configure the runtime JRE/JDK as vscode-java ships with one for : win32-x64, darwin-x64, darwin-arm64, linux-x64, linux-arm64. Unless they explicitly choose the universal edition (which ships with no embedded JRE), or they currently wish to use javac as the underlying compiler (instead of ecj) which requires a Java 23 runtime for startup, there is java.jdt.ls.java.home to set a custom JRE for the actual extension.

As for configuring project JDKs, do you have https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack installed ? It has a way to configure the project JDK : https://code.visualstudio.com/docs/java/java-project#_configure-runtime-for-projects .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants