tkalkirill commented on code in PR #10287:
URL: https://github.com/apache/ignite/pull/10287#discussion_r989075564


##########
modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java:
##########
@@ -183,6 +182,25 @@ public static GridJavaProcess exec(String clsName, String 
params, @Nullable Igni
         return gjProc;
     }
 
+    /**
+     * Resolves path to java binary (that can be executed using exec). Either 
the provided java home directory
+     * is used, or, if it's null, the java.home system property is consulted 
with.
+     *
+     * @param javaHome Java home directory where to look for bin/java; if 
null, then java.home property value is used.
+     * @return Path to Java executable.
+     */
+    public static String resolveJavaBin(@Nullable String javaHome) {
+        return resolveJavaHome(javaHome) + File.separator + "bin" + 
File.separator + "java";
+    }
+
+    /**
+     * Returns the provided java home path or, if it's null, falls back to the 
path obtained via 'java.home'

Review Comment:
   ```suggestion
        * Returns the provided java home path or, if it's {@code null}, falls 
back to the path obtained via 'java.home'
   ```



##########
modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java:
##########
@@ -183,6 +182,25 @@ public static GridJavaProcess exec(String clsName, String 
params, @Nullable Igni
         return gjProc;
     }
 
+    /**
+     * Resolves path to java binary (that can be executed using exec). Either 
the provided java home directory
+     * is used, or, if it's null, the java.home system property is consulted 
with.

Review Comment:
   ```suggestion
        * is used, or, if it's {@code null}, the java.home system property is 
consulted with.
   ```



##########
modules/core/src/main/java/org/apache/ignite/internal/util/GridJavaProcess.java:
##########
@@ -183,6 +182,25 @@ public static GridJavaProcess exec(String clsName, String 
params, @Nullable Igni
         return gjProc;
     }
 
+    /**
+     * Resolves path to java binary (that can be executed using exec). Either 
the provided java home directory
+     * is used, or, if it's null, the java.home system property is consulted 
with.
+     *
+     * @param javaHome Java home directory where to look for bin/java; if 
null, then java.home property value is used.

Review Comment:
   ```suggestion
        * @param javaHome Java home directory where to look for bin/java; if 
{@code null}, then java.home property value is used.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to