Sdk () { VirtualFile jdkHomeDir = LocalFileSystem.getInstance().refreshAndFindFileByIoFile(new File(myJdkHome)); JavaSdk javaSdk = JavaSdk.getInstance(); SdkType javaSdkType = javaSdk == null ? SimpleJavaSdkType.getInstance() : javaSdk; Sdk jdk = SdkConfigurationUtil.setupSdk(new Sdk[0], jdkHomeDir, javaSdkType, true, null, GRADLE_JDK_NAME); assertNotNull("Cannot create JDK for " + myJdkHome, jdk); return jdk; }