@@ -0,0 +1,1822 @@
+/*%0A * Copyright 2000-2010 JetBrains s.r.o.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0A/*%0A * @author max%0A */%0Apackage com.intellij.rt.execution;%0A%0Aimport java.io.BufferedReader;%0Aimport java.io.File;%0Aimport java.io.FileReader;%0Aimport java.io.IOException;%0Aimport java.net.URL;%0Aimport java.net.URLClassLoader;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Apublic class ExternalClasspathClassLoader extends URLClassLoader %7B%0A  public ExternalClasspathClassLoader() %7B%0A    super(parseUrls());%0A  %7D%0A%0A  private static URL%5B%5D parseUrls() %7B%0A    final List urls = new ArrayList();%0A    final File file = new File(System.getProperty(%22classpath.file%22));%0A    try %7B%0A      final BufferedReader reader = new BufferedReader(new FileReader(file));%0A      try %7B%0A        while(reader.ready()) %7B%0A          final String fileName = reader.readLine();%0A          try %7B%0A            urls.add(new File(fileName).toURI().toURL());%0A          %7D%0A          catch (NoSuchMethodError e) %7B%0A            urls.add(new File(fileName).toURL());%0A          %7D%0A        %7D%0A      %7D%0A      finally %7B%0A        reader.close();%0A      %7D%0A%0A      return (URL%5B%5D)urls.toArray(new URL%5Burls.size()%5D);%0A    %7D%0A    catch (IOException e) %7B%0A      throw new RuntimeException(%22Cannot read classpath entries from file: %22 + e);%0A    %7D%0A    finally %7B%0A      file.delete();%0A    %7D%0A  %7D%0A%7D%0A

Use custom classloader that reads classpath entries from the file to avoid failure creating junit process.