Warnings when using Java SE Version 19
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- emacs-lisp, java
- Domain
- developer-experience, tooling
Research direction
Reproduce the warning with lsp-java/jdtls on the described empty Gradle or Maven Spring project using Java 19. Start by inspecting the generated .classpath JRE_CONTAINER entry and the project setup around the Demo class; done means the Java 19 project opens without a JavaSE-17 compatibility warning.
Written by the indexing model from the issue text.
Description
Describe the bug
When working on projects with JDK 19, the language server reports a warning:
[Java] Build path specifies execution environment JavaSE-17. There are no JREs installed in the workspace that are strictly compatible with this environment. (0:0)
Somehow, the .classpath file always includes a line
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17/"/>
which may be (or not?) the cuprit.
I am using a standard, empty, Spring project with Gradle (but same thing happened with Maven), and Java 19.
To Reproduce
- Install the
jdtlsprovided bylsp-java. - Create a Java Spring project using Gradle and Java 19 without dependencies.
- Open the Demo class file.
- Observe the warning.
Expected behavior
No warnings about JDK (JRE) 17 on a project using JDK 19.
- Dominant language
- Emacs Lisp
- Stars
- 696
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from emacs-lsp/lsp-java
-
dap-java discards module paths from resolveClasspath causing JPMS-modular projects fail to launchOpen
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
All issues in emacs-lsp/lsp-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jessepollak/home#1454 ·
Maintainers usually reply within 1 day
-
kinogo-films.vipOpenN: AdGuard for iOS P3: Medium T: Ads
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AdguardTeam/AdguardFilters#242874 ·
Maintainers usually reply within 1 day
-
Theme: Bots Type: Bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
internetarchive/openlibrary#13743 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
bytedance/trae-agent#526 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day