Skip to content
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

JDK Requirements should clarify that java 8 requires a jre, not a jdk #1300

Open
LudwikJaniuk opened this issue Feb 21, 2023 · 3 comments
Open

Comments

@LudwikJaniuk
Copy link

https://github.com/redhat-developer/vscode-java/wiki/JDK-Requirements documents how to set the project JDK. The example config contains "path": "/path/to/jdk-8". However, when I followed the instructions and entered a path to a JDK, I got an error that the jdk did not fulfill the requirements of "JavaSE-1.8". When I instead downloaded a jdk8 jre and pointed to it, everything worked. So I think the documentation should more clearly state that you need a JRE, not a JDK, for java 8.

Environment
  • Operating System: Ubuntu Linux
  • JDK version: 8
  • Visual Studio Code version: 1.75.1
  • Java extension version: Language Support for Java(TM) by Red Hat v1.15.0
  • Java Debugger extension version: Debugger for Java v0.48.0
Steps To Reproduce
  1. Follow instructions in https://github.com/redhat-developer/vscode-java/wiki/JDK-Requirements to configure a java 8 jdk as the default
  2. Observe error "Runtime at '/path/to/jdk1.8.0_xxx' is not compatible with the 'JavaSE-1.8' environment"
@testforstephen
Copy link
Contributor

So I think the documentation should more clearly state that you need a JRE, not a JDK, for java 8.

That's not true. It supports using a JDK 1.8 for 'JavaSE-1.8'.

image

What JDK distribution do you use?

@LudwikJaniuk
Copy link
Author

Thanks... you're right, it's not the JRE that's the issue. I don't know why, but this error occurs inconsistently now and again, without a specific change I can observe...

To answer your question, I use Oracle jdk 8.

Maybe I could ask, when seeing the "Runtime at '/path/to/jre1.8.0_333' is not compatible with the 'JavaSE-1.8' environment" error, what is the criteria that it looked for in the jdk/jre?

@jswolf19
Copy link

I get this error using an Adoptium JDK as well. I upgraded from some version (which also had the problem) to jdk-8.0.392.8-hotspot but the problem persists.
Is there any documentation on how compatibility is determined?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants