public static JvmType createFromJavaExecutable(final String javaExecutable, boolean forLaunch) {
        assert javaExecutable != null;

        if (javaExecutable.equals(JAVA_WIN_EXECUTABLE) || javaExecutable.equals(JAVA_UNIX_EXECUTABLE)) {
            return createFromEnvironmentVariable(forLaunch);
        } else {
            return new JvmType(forLaunch, isModularJvm(javaExecutable, forLaunch), javaExecutable);
        }
    }
public static JvmType createFromJavaExecutable ( final String javaExecutable , boolean forLaunch ) { assert javaExecutable != null ; if ( javaExecutable . equals ( JAVA_WIN_EXECUTABLE ) || javaExecutable . equals ( JAVA_UNIX_EXECUTABLE ) ) { return createFromEnvironmentVariable ( forLaunch ) ; } else { return new JvmType ( forLaunch , isModularJvm ( javaExecutable , forLaunch ) , javaExecutable ) ; } }
Create a {@code JvmType} based on the location of the java executable.
@param javaExecutable the location of the java executable. Cannot be {@code null} or empty
@param forLaunch {@code true} if the created object will be used for launching servers; {@code false}
if it is simply a data holder. A value of {@code true} will disable
some validity checks and may disable determining if the JVM is modular
@return the {@code JvmType}. Will not return {@code null}