package com.intellij.debugger.streams;

import com.intellij.openapi.projectRoots.JavaSdk;
import com.intellij.openapi.projectRoots.Sdk;
import com.intellij.openapi.projectRoots.impl.JavaSdkImpl;

import java.io.File;

/**
 * @author Vitaliy.Bibaev
 */
public class JdkManager {
  private static final String MOCK_JDK_DIR_NAME_PREFIX = "mockJDK-";
  private static final Sdk JDK18;

  static {
    final String path = new File("java/" + MOCK_JDK_DIR_NAME_PREFIX + "1.8").getAbsolutePath();
    JDK18 = ((JavaSdkImpl)JavaSdk.getInstance()).createMockJdk("java 1.8", path, false);
  }

  public static Sdk getMockJdk18() {
    return JDK18;
  }
}

@@ -271,16 +271,58 @@
 nager %7B%0A
+  public static final String JDK18_PATH;%0A%0A
   privat
@@ -382,16 +382,17 @@
 kJDK-%22;%0A
+%0A
   privat
@@ -404,219 +404,237 @@
 tic 
-final Sdk JDK18;%0A%0A  static %7B%0A    final String path = new File(%22java/%22 + MOCK_JDK_DIR_NAME_PREFIX + %221.8%22).getAbsolutePath();%0A    JDK18 = ((JavaSdkImpl)JavaSdk.getInstance()).createMockJdk(%22java 1.8%22, path, false
+class Holder %7B%0A    static final Sdk JDK18 = ((JavaSdkImpl)JavaSdk.getInstance()).createMockJdk(%22java 1.8%22, JDK18_PATH, false);%0A  %7D%0A%0A  static %7B%0A    JDK18_PATH = new File(%22java/%22 + MOCK_JDK_DIR_NAME_PREFIX + %221.8%22).getAbsolutePath(
 );%0A 
@@ -685,16 +685,23 @@
  return 
+Holder.
 JDK18;%0A 

Initialize JdkManager correctly