start jps server with "awt headless" property and classpath logging

This commit is contained in:
Eugene Zhuravlev
2011-11-17 12:47:59 +01:00
parent efb6b28c86
commit 1dd5bf1305
2 changed files with 6 additions and 5 deletions
@@ -318,18 +318,18 @@ public class JpsServerManager implements ApplicationComponent{
cmdLine.addParameter("-ea");
cmdLine.addParameter("-XX:MaxPermSize=150m");
cmdLine.addParameter("-XX:ReservedCodeCacheSize=64m");
cmdLine.addParameter("-Djava.awt.headless=true");
// todo: get xmx value from settings
if (SystemInfo.is64Bit) {
cmdLine.addParameter("-Xmx1024m");
cmdLine.addParameter("-Xmx700m");
}
else {
cmdLine.addParameter("-Xmx512m");
}
// debugging
cmdLine.addParameter("-XX:+HeapDumpOnOutOfMemoryError");
cmdLine.addParameter("-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5008");
//cmdLine.addParameter("-XX:+HeapDumpOnOutOfMemoryError");
//cmdLine.addParameter("-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5008");
// javac's VM should use the same default locale that IDEA uses in order for javac to print messages in 'correct' language
final String lang = System.getProperty("user.language");
@@ -25,7 +25,7 @@ import java.util.concurrent.Executors;
public class Server {
public static final int DEFAULT_SERVER_PORT = 7777;
private static final int MAX_SIMULTANEOUS_BUILD_SESSIONS = Math.max(2, Runtime.getRuntime().availableProcessors());
public static final String SERVER_SUCCESS_START_MESSAGE = "JPS Server started successfully. Listening on port port: ";
public static final String SERVER_SUCCESS_START_MESSAGE = "JPS Server started successfully. Listening on port: ";
public static final String SERVER_ERROR_START_MESSAGE = "Error starting JPS Server: ";
private final ChannelGroup myAllOpenChannels = new DefaultChannelGroup("jps-server");
@@ -97,6 +97,7 @@ public class Server {
server.stop();
}
});
System.out.println("Server classpath: " + System.getProperty("java.class.path"));
System.err.println(SERVER_SUCCESS_START_MESSAGE + port);
}
catch (Throwable e) {