We need this special handling here.

If we're running in the Digester, we need to and will see all of the
java_location properties (one for each supported platform), but if we're
running in a real installation, we'll only see the the one java_location that's
appropriate for our platform.

This initJava code gets called while we're in Digester mode, so it needs not to
crash when it sees multiple java_location entries.
This commit is contained in:
Michael Bayne
2026-02-12 15:34:54 -08:00
parent 3f80104238
commit 73bd66758d
@@ -686,7 +686,10 @@ public class Application
// check to see if we require a particular JVM version and have a supplied JVM // check to see if we require a particular JVM version and have a supplied JVM
_javaExactVersionRequired = config.getBoolean("java_exact_version_required"); _javaExactVersionRequired = config.getBoolean("java_exact_version_required");
_javaLocation = config.getString("java_location"); Object javaloc = config.getRaw("java_location");
if (javaloc instanceof String) {
_javaLocation = (String)javaloc;
}
// used only in conjunction with java_location // used only in conjunction with java_location
_javaLocalDir = getLocalPath(config.getString("java_local_dir", LaunchUtil.LOCAL_JAVA_DIR)); _javaLocalDir = getLocalPath(config.getString("java_local_dir", LaunchUtil.LOCAL_JAVA_DIR));