public static boolean guessWithJava() {
		boolean withJava;
		Jdk defJdk = defaultJdkManager().getJdk(null);
		String javaHome = System.getenv("JAVA_HOME");
		Path javacCmd = Util.searchPath("javac");
		withJava = defJdk != null
				&& (javaHome == null
						|| javaHome.isEmpty()
						|| javaHome.toLowerCase().startsWith(Settings.getConfigDir().toString().toLowerCase()))
				&& (javacCmd == null || javacCmd.startsWith(Settings.getConfigBinDir()));
		return withJava;
	}
Makes a best guess if JAVA_HOME should be set by us or not. Returns true if
no JAVA_HOME is set and javac wasn't found on the PATH and we have at least
one managed JDK installed by us. Otherwise it returns false.
src/main/java/dev/jbang/cli/App.java