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
I use Visual Studio Code (version 1.50.1 as I write this) with the Language Support for Java(TM) extension by RedHat (version 0.69.0 as I write this) to pretty much write all my Java code.
Just like how it says to do on this project's README. However, the Java support extension read the <release>8</release> tag and sets the language level of the project to JavaSE-1.8, so VS Code complains if I use syntax from Java 9+:
My project compiles correctly through the command prompt, though.
VS Code won't give me an error if I set the <release> tag to 11, as it will set the language level to JavaSE-11, or if I omit it from the pom.xml, as it will default to the JDK I use to run the Java support extension (11 is the minimum):
... but then I imagine the compiler won't actually make the final jar a Java 8 app, right?
Is there a way to fix this?
The text was updated successfully, but these errors were encountered:
Well, the fix for IntelliJ is the intellij-idea-only profile. My solution for NetBeans is to have this profile always active (unfortunately I did not find a trigger like for IntelliJ) and disallow this profile for all maven tasks (so NetBeans is actually running mvn -P intellij-idea-only, !intellij-idea-only ... which for me resulted in the profile staying inactive for actual compilation/ tests 🤞).
I use Visual Studio Code (version 1.50.1 as I write this) with the Language Support for Java(TM) extension by RedHat (version 0.69.0 as I write this) to pretty much write all my Java code.
I have it like this in my pom.xml file:
Just like how it says to do on this project's README. However, the Java support extension read the
<release>8</release>
tag and sets the language level of the project to JavaSE-1.8, so VS Code complains if I use syntax from Java 9+:My project compiles correctly through the command prompt, though.
VS Code won't give me an error if I set the
<release>
tag to 11, as it will set the language level to JavaSE-11, or if I omit it from the pom.xml, as it will default to the JDK I use to run the Java support extension (11 is the minimum):... but then I imagine the compiler won't actually make the final jar a Java 8 app, right?
Is there a way to fix this?
The text was updated successfully, but these errors were encountered: