Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Warnings when using Java SE Version 19

Open
#422 7 comments 0 reactions 0 assignees View on GitHub

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

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 jdtls provided by lsp-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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from emacs-lsp/lsp-java

All issues in emacs-lsp/lsp-java

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.