-
Notifications
You must be signed in to change notification settings - Fork 446
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
Use default JVM when importing gradle project #1426
Comments
Did you add
at the root of your build.gradle (not in the compileJava block)? |
I tried this but (imo) this is not a good solution. I don't need currently to use JDK 11 for development (plus I think it's a poor idea to just assume java.home as the default if I set it manually in java.configuration.runtime.) I set it in a subproject (not the root project) and it didn't work. Setting the comparability mode for every single project I work on is unfeasible (especially if I try to work on an old project, or a project I cannot edit.) I could manually add it every time I guess, but this is quite the pain while developing. Is it possible to always use the default java.configuration.runtime option? Or at least have a manual setting to always use a different jdk to compile? |
Other then that, it seems awkward to do that in the root of build.gradle when the gradle docs tell you to do that differently. EDIT: I'm guessing though this is a downstream issue that can't be fixed at vscode level? Seems to be the case from the comment on your issue. Guess there simply is nothing I can do? |
|
I'm not saying it isn't best practice (as long as the downstream is fixed anyway), but it isn't feasible to do this for every single project in a big team. I will start doing it in the future , but I see nothing wrong with if you set the default runtime, it should just use that one. |
So, i have a gradle project and have set the following configuration:
However, my problems section is complaining about missing the javax classes which were removed after java 8, indicating that it's not using jdk 8.
Environment
Steps To Reproduce
Current Result
Doesn't use JDK8
Expected Result
Uses JDK8
Additional Informations
The text was updated successfully, but these errors were encountered: