Path () { // try to use environment variable for custom data directory // https://asdf-vm.com/#/core-configuration?id=environment-variables String dataDir = mySystemInfo.getEnvironmentVariable("ASDF_DATA_DIR"); if (dataDir != null) { Path primaryDir = mySystemInfo.getPath(dataDir); if (safeIsDirectory(primaryDir)) { Path installsDir = primaryDir.resolve("installs"); if (safeIsDirectory(installsDir)) return installsDir; } } // finally, try the usual location in Unix or macOS if (!(this instanceof JavaHomeFinderWindows) && !(this instanceof JavaHomeFinderWsl)) { Path installsDir = getPathInUserHome(".asdf/installs"); if (installsDir != null && safeIsDirectory(installsDir)) return installsDir; } // no chances return null; }