diff options
-rwxr-xr-x | find_java/src/source/find_java_lib.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/find_java/src/source/find_java_lib.cpp b/find_java/src/source/find_java_lib.cpp index 4da645c..fe50f83 100755 --- a/find_java/src/source/find_java_lib.cpp +++ b/find_java/src/source/find_java_lib.cpp @@ -554,9 +554,12 @@ bool getJavaVersion(CPath &javaPath, CString *outVersionStr, int *outVersionInt) // care about specific ordering or case-senstiviness.
// We only captures roughtly the first line in lower case.
char *j = strstr(first32, "java");
+ if (!j) {
+ j = strstr(first32, "openjdk");
+ }
char *v = strstr(first32, "version");
if ((gIsConsole || gIsDebug) && (!j || !v)) {
- fprintf(stderr, "Error: keywords 'java version' not found in '%s'\n", first32);
+ fprintf(stderr, "Error: keywords 'java|openjdk version' not found in '%s'\n", first32);
}
if (j != NULL && v != NULL) {
result = extractJavaVersion(first32, index, outVersionStr, outVersionInt);
|