langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/ClientMain.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/ClientMain.java Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/ClientMain.java Sun Jan 24 11:32:38 2016 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -67,10 +67,10 @@
Log.debug("==========================================================");
// Prepare sjavac object
- boolean background = Util.extractBooleanOption("background", options.getServerConf(), true);
+ boolean useServer = options.getServerConf() != null;
Sjavac sjavac;
// Create an sjavac implementation to be used for compilation
- if (background) {
+ if (useServer) {
try {
sjavac = new SjavacClient(options);
} catch (PortFileInaccessibleException e) {
@@ -83,7 +83,8 @@
int rc = sjavac.compile(args, out, err);
- if (!background)
+ // If sjavac is running in the foreground we should shut it down at this point
+ if (!useServer)
sjavac.shutdown();
return rc;