< prev index next >
test/testlibrary/ctw/src/sun/hotspot/tools/ctw/CompileTheWorld.java
Print this page
@@ -33,12 +33,12 @@
import java.util.concurrent.*;
public class CompileTheWorld {
// in case when a static constructor changes System::out and System::err
// we hold these values of output streams
- public static final PrintStream OUT = System.out;
- public static final PrintStream ERR = System.err;
+ static PrintStream OUT = System.out;
+ static final PrintStream ERR = System.err;
/**
* Entry point. Compiles classes in {@code paths}
*
* @param paths paths to jar/zip, dir contains classes, or to .lst file
* contains list of classes to compile
@@ -54,11 +54,11 @@
os = new PrintStream(Files.newOutputStream(Paths.get(logfile)));
} catch (IOException io) {
}
}
if (os != null) {
- System.setOut(os);
+ OUT = os;
}
try {
try {
if (ManagementFactory.getCompilationMXBean() == null) {
@@ -87,13 +87,10 @@
} finally {
if (os != null) {
os.close();
}
}
- // in case when a static constructor creates and runs a new thread
- // we force it to exit
- System.exit(0);
}
private static ExecutorService createExecutor() {
final int threadsCount = Math.min(
Runtime.getRuntime().availableProcessors(),
< prev index next >