neilcsmith-net commented on code in PR #4390:
URL: https://github.com/apache/netbeans/pull/4390#discussion_r922665645
##########
java/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/platformdefinition/DefaultPlatformImpl.java:
##########
@@ -84,6 +102,12 @@ static JavaPlatform create(Map<String,String> properties,
List<URL> sources, Lis
return new DefaultPlatformImpl(installFolders, properties,
systemProperties, sources, javadoc);
}
+ private static boolean isValidJDKHome(Path javaHome) {
+ return Files.exists(javaHome.resolve(Path.of("bin", "java")))
+ && Files.exists(javaHome.resolve(Path.of("bin", "javac")));
+// && Files.exists(javaHome.resolve(Path.of("jmods",
"java.base.mod"))); // TODO: uncomment once everything migrated to 11+
Review Comment:
Did you test this? Because that's probably still returning `true`. The IDE
wouldn't launch otherwise. The problem is that those files are symlinks. Are
there any circumstances that `java.home` will not be correct? I would either
default to that, or at least default to that if `<jdk.home>/bin/java` is a
symlink.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists