private static String getPathToRmic(ModuleChunk chunk) {
    final JpsSdk<?> sdk = chunk.representativeTarget().getModule().getSdk(JpsJavaSdkType.INSTANCE);
    if (sdk != null) {
      final String executable = JpsJavaSdkType.getJavaExecutable(sdk);
      final int idx = FileUtil.toSystemIndependentName(executable).lastIndexOf("/");
      if (idx >= 0) {
        return executable.substring(0, idx) + "/rmic";
      }
    }
    return SystemProperties.getJavaHome() + "/bin/rmic";
  }
private static String getPathToRmic(ModuleChunk chunk)