Comments (8)
Also documented in https://github.com/redhat-developer/vscode-java/wiki/Enabling-Java-preview-features
from vscode-java.
It has always been the case that preview feature support can only be used against the latest supported Java version (ie. 22) by the extension. https://bugs.eclipse.org/bugs/show_bug.cgi?id=549258#c11 also gives an explanation of this (and that to follow the JEP, one cannot allow --enable-preview
to work except for the latest supported Java version.
I'm guessing this is just a lot more visible now because Java 21 is LTS. While before, people had no issues with updating to the latest release level to continue the 2nd/3rd/.. preview of feature , or consume it after it graduates to a standard feature, now users might wish to stay on the Java 21 LTS.
from vscode-java.
Is that normal to not use enable preview on 21 for this?
Yes, it is when using VS Code 1.29.0
from vscode-java.
Is your project a Maven/Gradle project ? Does the project target Java 21 while having Java preview features enabled in the build configuration ? Any chance you'd be able to share the project ?
from vscode-java.
Project is private. Maven project.
Targets Java 21:
Also current JAVA_HOME:
Preview Features enabled:
from vscode-java.
@bgunduz55 Could you try to set the project target to Java 22?
from vscode-java.
I think you're facing the same issue as eclipse-jdtls/eclipse.jdt.ls#3131 . In 1.29.0, we added support for Java 22, and the --enable-preview
flag is only supported for the latest Java version.
As @snjeza just mentioned, if you change the compiler compliance to 22
or leave it as is and remove the --enable-preview
flag, does the issue go away ?
from vscode-java.
Looks, that's the issue. I just tried remove --enable-preview and it worked on latest version.
I'll try changing compiler target version as 22 too, when I'm available.
Thanks for help @rgrunber @snjeza .
Is that normal to not use enable preview on 21 for this?
from vscode-java.
Related Issues (20)
- Incorrect JDK used when running with Gradle HOT 4
- Version 1.30.0 does not work on Ubuntu WSL2 HOT 9
- "Attempted to endRule: null, does not match most recent begin: R/" during "Classpath Update Job" HOT 1
- Java Language Server fails with classes that extends sealed class.
- bug: 🐛 VSCode JLS error when loading project with lot of Maven sub modules HOT 7
- Extension breaks "clipboardPasteAction" in Java files HOT 1
- Building a project never finishes HOT 6
- Terminal cannot running HOT 1
- Syntax highlighting changes HOT 7
- [Navigation Breadcrumbs] - Not Available in library classes
- [Bug - Go To/Navigation Java Records] - Can not go to Class
- [Bug - Autocompletion] - Does not work with Record implements Interface
- [Bug - Go To/Navigation/References] - Does not work for Private Methods/Constructor
- Show call hierarchy with lambda functions doesn't show the full stack call
- Gradle 8.6 and 8.7 are unsupported HOT 5
- Language Support Fails to Start on MacOS: Error: Unable to generate a random pipe name with 7 characters. HOT 4
- vscode Java no definition found no references found Java HOT 1
- Cannot Commit HOT 1
- Support debug on SpyBeans HOT 5
- Java language sever only opens for user with id=1000 on wsl HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-java.