Java Version Detection doesn't work on all version strings
See original GitHub issueLooking here https://github.com/forcedotcom/salesforcedx-vscode/blob/master/packages/salesforcedx-vscode-apex/src/requirements.ts line 86
javaHome + '/bin/java', ['-version'], {},
(error, stdout, stderr) => {
if (
stderr.indexOf('build 1.8') < 0 &&
stderr.indexOf('build 11.') < 0
) {
reject(nls.localize('wrong_java_version_text', SET_JAVA_DOC_LINK));
} else {
resolve(true);
}
}
I’m using openJDK and it looks like my output is different
_Originally posted by @Londoner1234 in https://github.com/forcedotcom/salesforcedx-vscode/issues/930#issuecomment-495531429_
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Version Comparison in Java - Baeldung
In this article, we'll explore a few ways to compare version strings in Java through various libraries.
Read more >java --version doesn't work in the command line - Stack Overflow
So, I uninstalled the previous versions, restarted and then installed fresh jdk 7u5 windows i586. Still I get the same problem. Can anyone...
Read more >Java version detected but couldn't parse version from ... - GitHub
Try installing Java 8. If that doesn't just work, set the JAVA_HOME environment variable.
Read more >How to Change Java Versions in Windows (Updated for JDK 18)
Step 1: Installing Multiple Java Versions. Installing multiple Java versions in parallel is incredibly easy in Windows. You can download and run the...
Read more >How to find Java version in Windows or Mac - Manual method
Under the General tab in the Java Control Panel, the version is available through the About section. A dialog appears (after clicking About)...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Please, consider adding 12 already since it’s GA
@shillem OH ! NO !I tried to use the GA version of openjdk11 and the GA version of openjdk17, but it didn’t work, I also used the build 11.0.2+9 version of openjdk, luckily it worked. When I change to Oraclejdk11 or Oraclejdk17, it works fine.
There is one thing I don’t understand, is there any logic for salesforcedx-vscode in the selection of supported openjdk versions? Why does not support the GA version of opengdk ? @shillem GA clearly means General Availability, which represents the officially released version, the official began to recommend widespread use.
I got openjdk from this website👉https://jdk.java.net/archive/