1

32bit and 64bit

This question is tailored for those who do some research on how to use an older java than java 11 (e.g., Java 8) on vscode-java, thus for those who do not run into the error of

"Java 11 or more recent is required to run. Please download and install a recent JDK."

Since then this here would be a clear duplicate with https://stackoverflow.com/questions/63043585/vscode-showing-java-11-or-more-recent-is-required-to-run-please-download-and-i/63045780#63045780.

This question here shall help those who have found out about that issue in advance, without knowing the upcoming error and who thus cannot search for the error and find the solution link above.

I need to stress this in order to make clear that this might be no clear duplicate.

Now the actual issue:

According to https://github.com/redhat-developer/vscode-java/wiki/JDK-Requirements#jdk11.requirement:

"Since vscode-Java 0.65.0, Java 11 is the minimum required version."

+++As of July 22nd, 2020, Java 11 (JDK11) is now required for running vscode-java.+++

As a result, a lot of users who run their projects on a lower Java version need to change the version or find a workaround so that they might keep everything "as is".

How can I use vscode-java on java below version 11 after the new requirement of java 11 in vscode-java 0.65.0?

An answer is needed both for 32bit and on 64bit.

####

Only for 32bit

Mind for the answer that Oracle JDK 8 is the last Oracle JDK to support 32bit x86 at all, the same accounts for OpenJDK.

And neither Oracle JDK 11 nor OpenJDK support 32bit x86.

I am searching for the best workaround of how to use the most recent possible JDK on a Windows 32bit using the vscode-java extension, it does not have to be an Oracle JDK.

An answer is needed only for 32bit.

1
  • 1
    “ NO you don't! Well you should, be we're not here to judge. It is still possible to compile/run Java applications from Java 1.5 to 14, provided the proper java.configuration.runtimes are configured in the user's settings.json.” - This means you can upgrade the extension and use the Java runtime of your choice. – Ramhound Aug 7 '20 at 14:22
2

Only for 32bit START

+++Please mind that 32bit is usually outdated. This is probably just for those who have an old netbook lying around.+++

You can just switch to OpenJDK 14, which is recommended by vscode "itself" (Oracle JDK has stopped support for 32bit after version 8).

This vscode site https://github.com/redhat-developer/vscode-java/wiki/JDK-Requirements#jdk11.requirement recommends the following link right at the top at the Java Development Kit link:

https://adoptopenjdk.net/

A non-Oracle JDK is thus the only way to use java 14 on a 32bit.

Only for 32bit END

####

32bit and 64bit START

For those who cannot install JDK 11 or higher due to a 32bit system together with a not allowed OpenJDK JDK (that is, if Oracle JDK is obligatory), or those who have other restrictions on 64bit, one workaround is to install vscode-java version 0.64.1 instead of the most recent 0.65.0. (This again, is not recommended unless you have restrictions on the JDK version, it is just possible, see above)

See https://github.com/redhat-developer/vscode-java/issues/1543#issuecomment-669895753

How to install the earlier extension version:

enter image description here

EDIT

You should not do the following if you have no other restrictions. The most plausible restriction is that you use Windows 32bit and you have to use an Oracle JDK (Oracle JDK 8 is the last version supporting 32bit). Or if you must use Gradle with a version below 4.7, see the github discussion again.

In the usual case: upgrade, and then you can still go back to using an older java version by changing the settings according to https://github.com/redhat-developer/vscode-java/wiki/JDK-Requirements#jdk11.requirement:

Do I need to migrate my projects to Java 11?

"NO, you don't! Well, you should, be we're not here to judge. It is still possible to compile/run Java applications from Java 1.5 to 14, provided the proper java.configuration.runtimes are configured in the user's settings.json."

--> This means you can upgrade the extension and use the Java runtime of your choice. See detailed instructions for Windows 64bit at https://github.com/redhat-developer/vscode-java/issues/1543#issuecomment-671106893.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.