Sdk (Sdk @NotNull [] allSdks, @NotNull VirtualFile homeDir, @NotNull SdkType sdkType, final boolean silent, @Nullable final SdkAdditionalData additionalData, @Nullable final String customSdkSuggestedName) { ProjectJdkImpl sdk = null; try { sdk = createSdk(Arrays.asList(allSdks), homeDir, sdkType, additionalData, customSdkSuggestedName); sdkType.setupSdkPaths(sdk); } catch (Throwable e) { LOG.warn("Error creating or configuring sdk: homeDir=[" + homeDir + "]; " + "sdkType=[" + sdkType + "]; " + "additionalData=[" + additionalData + "]; " + "customSdkSuggestedName=[" + customSdkSuggestedName + "]; " + "sdk=[" + sdk + "]", e); if (!silent) { ApplicationManager.getApplication().invokeLater( () -> Messages.showErrorDialog( ProjectBundle.message( "dialog.message.error.configuring.sdk.0.please.make.sure.that.1.is.a.valid.home.path.for.this.sdk.type", e.getMessage(), FileUtil.toSystemDependentName(homeDir.getPath()) ), ProjectBundle.message("dialog.title.error.configuring.sdk") ) ); } return null; } return sdk; }