8056989: Sjavac --server option should be optional
authoralundblad
Sun, 24 Jan 2016 11:32:38 +0100
changeset 35356 e919fd8db52c
parent 35355 817b3a285dbb
child 35357 e0eb0cf7fffe
8056989: Sjavac --server option should be optional 8147568: NullPointerException in option parsing Summary: Made --server option optional (and background=true implied) Reviewed-by: jlahoda, erikj
langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/Util.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/client/ClientMain.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SjavacImpl.java
langtools/test/tools/sjavac/ClasspathDependencies.java
langtools/test/tools/sjavac/CompileCircularSources.java
langtools/test/tools/sjavac/CompileExcludingDependency.java
langtools/test/tools/sjavac/CompileWithAtFile.java
langtools/test/tools/sjavac/CompileWithInvisibleSources.java
langtools/test/tools/sjavac/CompileWithOverrideSources.java
langtools/test/tools/sjavac/HiddenFiles.java
langtools/test/tools/sjavac/IgnoreSymbolFile.java
langtools/test/tools/sjavac/IncCompInheritance.java
langtools/test/tools/sjavac/IncCompileChangeNative.java
langtools/test/tools/sjavac/IncCompileDropClasses.java
langtools/test/tools/sjavac/IncCompileFullyQualifiedRef.java
langtools/test/tools/sjavac/IncCompileNoChanges.java
langtools/test/tools/sjavac/IncCompileUpdateNative.java
langtools/test/tools/sjavac/IncCompileWithChanges.java
langtools/test/tools/sjavac/IncludeExcludePatterns.java
langtools/test/tools/sjavac/NoState.java
langtools/test/tools/sjavac/PackagePathMismatch.java
langtools/test/tools/sjavac/ParallelCompilations.java
langtools/test/tools/sjavac/PermittedArtifact.java
langtools/test/tools/sjavac/SJavacTester.java
langtools/test/tools/sjavac/StateDir.java
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/Util.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/Util.java	Sun Jan 24 11:32:38 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -87,7 +87,7 @@
     }
 
     public static boolean extractBooleanOption(String opName, String s, boolean deflt) {
-       String str = extractStringOption(opName, s);
+        String str = extractStringOption(opName, s);
         return "true".equals(str) ? true
              : "false".equals(str) ? false
              : deflt;
--- 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;
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SjavacImpl.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SjavacImpl.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
@@ -310,8 +310,6 @@
             err = "Please specify output directory.";
         } else if (options.isJavaFilesAmongJavacArgs()) {
             err = "Sjavac does not handle explicit compilation of single .java files.";
-        } else if (options.getServerConf() == null) {
-            err = "No server configuration provided.";
         } else if (!options.getImplicitPolicy().equals("none")) {
             err = "The only allowed setting for sjavac is -implicit:none";
         } else if (options.getSources().isEmpty() && options.getStateDir() != null) {
--- a/langtools/test/tools/sjavac/ClasspathDependencies.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/ClasspathDependencies.java	Sun Jan 24 11:32:38 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -47,8 +47,6 @@
 
 public class ClasspathDependencies extends SjavacBase {
 
-    static final String server = "--server:portfile=testserver,background=false";
-
     public static void main(String... args) throws Exception {
 
         Path root = Paths.get(ClasspathDependencies.class.getSimpleName() + "Test");
@@ -64,7 +62,7 @@
         headline("Create a test dependency, Dep.class, and put it in the classpath dir");
         String depCode = "package dep; public class Dep { public void m1() {} }";
         toolbox.writeFile(srcDep.resolve("dep/Dep.java"), depCode);
-        int rc = compile(server, "-d", classesDep, "--state-dir=" + classesDep, srcDep);
+        int rc = compile("-d", classesDep, "--state-dir=" + classesDep, srcDep);
         check(rc == 0, "Compilation failed unexpectedly");
 
         ////////////////////////////////////////////////////////////////////////
@@ -73,7 +71,7 @@
                           "package pkg;" +
                           "import dep.Dep;" +
                           "public class C { Dep dep; public void m() { new Dep().m1(); } }");
-        rc = compile(server, "-d", classes, "--state-dir=" + classes, src, "-cp", classesDep);
+        rc = compile("-d", classes, "--state-dir=" + classes, src, "-cp", classesDep);
         check(rc == 0, "Compilation failed unexpectedly");
         FileTime modTime1 = Files.getLastModifiedTime(classes.resolve("pkg/C.class"));
 
@@ -82,12 +80,12 @@
         Thread.sleep(2000);
         depCode = depCode.replaceAll("}$", "private void m2() {} }");
         toolbox.writeFile(srcDep.resolve("dep/Dep.java"), depCode);
-        rc = compile(server, "-d", classesDep, "--state-dir=" + classesDep, srcDep);
+        rc = compile("-d", classesDep, "--state-dir=" + classesDep, srcDep);
         check(rc == 0, "Compilation failed unexpectedly");
 
         ////////////////////////////////////////////////////////////////////////
         headline("Make sure that this does not trigger recompilation of C.java");
-        rc = compile(server, "-d", classes, "--state-dir=" + classes, src, "-cp", classesDep);
+        rc = compile("-d", classes, "--state-dir=" + classes, src, "-cp", classesDep);
         check(rc == 0, "Compilation failed unexpectedly");
         FileTime modTime2 = Files.getLastModifiedTime(classes.resolve("pkg/C.class"));
         check(modTime1.equals(modTime2), "Recompilation erroneously triggered");
@@ -97,12 +95,12 @@
         Thread.sleep(2000);
         depCode = depCode.replace("m1()", "m1(String... arg)");
         toolbox.writeFile(srcDep.resolve("dep/Dep.java"), depCode);
-        rc = compile(server, "-d", classesDep, "--state-dir=" + classesDep, srcDep);
+        rc = compile("-d", classesDep, "--state-dir=" + classesDep, srcDep);
         check(rc == 0, "Compilation failed unexpectedly");
 
         ////////////////////////////////////////////////////////////////////////
         headline("Make sure that recompilation of C.java is triggered");
-        rc = compile(server, "-d", classes, "--state-dir=" + classes, src, "-cp", classesDep);
+        rc = compile("-d", classes, "--state-dir=" + classes, src, "-cp", classesDep);
         check(rc == 0, "Compilation failed unexpectedly");
         FileTime modTime3 = Files.getLastModifiedTime(classes.resolve("pkg/C.class"));
         check(modTime2.compareTo(modTime3) < 0, "Recompilation not triggered");
--- a/langtools/test/tools/sjavac/CompileCircularSources.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/CompileCircularSources.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
@@ -64,7 +64,6 @@
                 "-h", HEADERS.toString(),
                 "--state-dir=" + BIN,
                 "-j", "3",
-                SERVER_ARG,
                 "--log=debug");
         Map<String,Long> new_bin_state = collectState(BIN);
         verifyThatFilesHaveBeenAdded(previous_bin_state,
--- a/langtools/test/tools/sjavac/CompileExcludingDependency.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/CompileExcludingDependency.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
@@ -60,8 +60,7 @@
                 "-x", "alfa/omega/*",
                 "-sourcepath", GENSRC.toString(),
                 "-d", BIN.toString(),
-                "--state-dir=" + BIN,
-                SERVER_ARG);
+                "--state-dir=" + BIN);
 
         Map<String,Long> new_bin_state = collectState(BIN);
         verifyThatFilesHaveBeenAdded(previous_bin_state, new_bin_state,
--- a/langtools/test/tools/sjavac/CompileWithAtFile.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/CompileWithAtFile.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
@@ -62,7 +62,7 @@
         Files.createDirectory(BIN);
         Map<String,Long> previous_bin_state = collectState(BIN);
 
-        compile("@" + GENSRC + "/list.txt", "--server:portfile=testserver,background=false");
+        compile("@" + GENSRC + "/list.txt");
 
         Map<String,Long> new_bin_state = collectState(BIN);
         verifyThatFilesHaveBeenAdded(previous_bin_state, new_bin_state,
--- a/langtools/test/tools/sjavac/CompileWithInvisibleSources.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/CompileWithInvisibleSources.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
@@ -70,8 +70,7 @@
                 "-d", BIN.toString(),
                 "--state-dir=" + BIN,
                 "-h", HEADERS.toString(),
-                "-j", "1",
-                SERVER_ARG);
+                "-j", "1");
 
         System.out.println("The first compile went well!");
         Map<String,Long> new_bin_state = collectState(BIN);
@@ -87,8 +86,7 @@
                              "-d", BIN.toString(),
                              "--state-dir=" + BIN,
                              "-h", HEADERS.toString(),
-                             "-j", "1",
-                             SERVER_ARG);
+                             "-j", "1");
 
         System.out.println("----- Compile without exluded beta failed, as expected! Good!");
     }
--- a/langtools/test/tools/sjavac/CompileWithOverrideSources.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/CompileWithOverrideSources.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
@@ -68,8 +68,7 @@
                 "-d", BIN.toString(),
                 "--state-dir=" + BIN,
                 "-h", HEADERS.toString(),
-                "-j", "1",
-                SERVER_ARG);
+                "-j", "1");
         Map<String,Long> new_bin_state = collectState(BIN);
         verifyThatFilesHaveBeenAdded(previous_bin_state, new_bin_state,
                                      BIN + "/alfa/omega/A.class",
@@ -84,8 +83,7 @@
                              "-d", BIN.toString(),
                              "--state-dir=" + BIN,
                              "-h", HEADERS.toString(),
-                             "-j", "1",
-                             SERVER_ARG);
+                             "-j", "1");
 
         System.out.println("----- Compile without exluded beta failed, as expected! Good!");
     }
--- a/langtools/test/tools/sjavac/HiddenFiles.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/HiddenFiles.java	Sun Jan 24 11:32:38 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -58,7 +58,6 @@
         // This compilation should fail (return RC_FATAL) since A.java refers to B.java and B.java
         // is excluded.
         int rc = compile("-x", "pkg/B.java", SRC.toString(),
-                         "--server:portfile=testportfile,background=false",
                          "-d", BIN.toString(),
                          "--state-dir=" + STATE_DIR);
 
--- a/langtools/test/tools/sjavac/IgnoreSymbolFile.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/IgnoreSymbolFile.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
@@ -55,17 +55,14 @@
 
         new File("classes").mkdirs();
 
-        String server = "--server:portfile=testserver,background=false";
-        int rc1 = compile(server,
-                          "-d", "classes",
+        int rc1 = compile("-d", "classes",
                           "--state-dir=classes",
                           "-Werror",
                           "src");
         if (rc1 == 0)
             error("compilation succeeded unexpectedly");
 
-        int rc2 = compile(server,
-                          "-d", "classes",
+        int rc2 = compile("-d", "classes",
                           "--state-dir=classes",
                           "-Werror",
                           "-XDignore.symbol.file=true",
--- a/langtools/test/tools/sjavac/IncCompInheritance.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/IncCompInheritance.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
@@ -52,8 +52,7 @@
         toolbox.writeFile(src.resolve("pkgc/C.java"), c);
 
         // Initial compile (should succeed)
-        String server = "--server:portfile=testserver,background=false";
-        int rc1 = compile(server, "-d", classes, "--state-dir=" + classes, src);
+        int rc1 = compile("-d", classes, "--state-dir=" + classes, src);
         if (rc1 != 0)
             throw new AssertionError("Compilation failed unexpectedly");
 
@@ -65,7 +64,7 @@
         // Incremental compile (C should now be recompiled even though it
         // depends on A only through inheritance via B).
         // Since A.m is removed, this should fail.
-        int rc2 = compile(server, "-d", classes, "--state-dir=" + classes, src);
+        int rc2 = compile("-d", classes, "--state-dir=" + classes, src);
         if (rc2 == 0)
             throw new AssertionError("Compilation succeeded unexpectedly");
     }
--- a/langtools/test/tools/sjavac/IncCompileChangeNative.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/IncCompileChangeNative.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
@@ -76,7 +76,6 @@
                 "--state-dir=" + BIN,
                 "-h", HEADERS.toString(),
                 "-j", "1",
-                SERVER_ARG,
                 "--log=debug");
         Map<String,Long> new_bin_state = collectState(BIN);
         verifyNewerFiles(previous_bin_state, new_bin_state,
@@ -106,7 +105,6 @@
                 "--state-dir=" + BIN,
                 "-h", HEADERS.toString(),
                 "-j", "1",
-                SERVER_ARG,
                 "--log=debug");
         Map<String,Long> new_bin_state = collectState(BIN);
         verifyNewerFiles(previous_bin_state, new_bin_state,
--- a/langtools/test/tools/sjavac/IncCompileDropClasses.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/IncCompileDropClasses.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
@@ -71,7 +71,6 @@
                 "--state-dir=" + BIN,
                 "-h", HEADERS.toString(),
                 "-j", "1",
-                SERVER_ARG,
                 "--log=debug");
         Map<String,Long> new_bin_state = collectState(BIN);
         verifyThatFilesHaveBeenRemoved(previous_bin_state, new_bin_state,
--- a/langtools/test/tools/sjavac/IncCompileFullyQualifiedRef.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/IncCompileFullyQualifiedRef.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
@@ -62,7 +62,6 @@
                 "-d", BIN.toString(),
                 "--state-dir=" + BIN,
                 "-j", "1",
-                SERVER_ARG,
                 "--log=debug");
         Map<String,Long> previous_bin_state = collectState(BIN);
 
@@ -77,7 +76,6 @@
                 "-d", BIN.toString(),
                 "--state-dir=" + BIN,
                 "-j", "1",
-                SERVER_ARG,
                 "--log=debug");
         Map<String,Long> new_bin_state = collectState(BIN);
 
--- a/langtools/test/tools/sjavac/IncCompileNoChanges.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/IncCompileNoChanges.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
@@ -69,7 +69,6 @@
                 "--state-dir=" + BIN,
                 "-h", HEADERS.toString(),
                 "-j", "1",
-                SERVER_ARG,
                 "--log=debug");
         Map<String,Long> new_bin_state = collectState(BIN);
         verifyEqual(new_bin_state, previous_bin_state);
--- a/langtools/test/tools/sjavac/IncCompileUpdateNative.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/IncCompileUpdateNative.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
@@ -76,7 +76,6 @@
                 "--state-dir=" + BIN,
                 "-h", HEADERS.toString(),
                 "-j", "1",
-                SERVER_ARG,
                 "--log=debug");
         Map<String,Long> new_bin_state = collectState(BIN);
         verifyNewerFiles(previous_bin_state, new_bin_state,
--- a/langtools/test/tools/sjavac/IncCompileWithChanges.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/IncCompileWithChanges.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
@@ -81,7 +81,6 @@
                 "--state-dir=" + BIN,
                 "-h", HEADERS.toString(),
                 "-j", "1",
-                SERVER_ARG,
                 "--log=debug");
         Map<String,Long> new_bin_state = collectState(BIN);
 
--- a/langtools/test/tools/sjavac/IncludeExcludePatterns.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/IncludeExcludePatterns.java	Sun Jan 24 11:32:38 2016 +0100
@@ -125,7 +125,6 @@
         toolbox.cleanDirectory(BIN);
         toolbox.cleanDirectory(STATE_DIR);
         String args = filterArgs + " " + SRC
-                + " --server:portfile=testportfile,background=false"
                 + " -d " + BIN
                 + " --state-dir=" + STATE_DIR;
         int rc = compile((Object[]) args.split(" "));
--- a/langtools/test/tools/sjavac/NoState.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/NoState.java	Sun Jan 24 11:32:38 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -49,7 +49,6 @@
         tb.writeFile(GENSRC.resolve("pkg/A.java"), "package pkg; class A {}");
         Files.createDirectory(BIN);
         compile("-d", BIN.toString(),
-                "--server:portfile=testserver,background=false",
                 GENSRC + "/pkg/A.java");
 
         // Make sure file was compiled
--- a/langtools/test/tools/sjavac/PackagePathMismatch.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/PackagePathMismatch.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
@@ -47,8 +47,7 @@
                           "package a.b.c; class Test { }");
 
         // Compile should fail since package a.b.c does not match path a/x/c.
-        int rc1 = compile("--server:portfile=testserver,background=false",
-                          "-d", classes,
+        int rc1 = compile("-d", classes,
                           "--state-dir=" + classes,
                           src);
         if (rc1 == 0)
--- a/langtools/test/tools/sjavac/ParallelCompilations.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/ParallelCompilations.java	Sun Jan 24 11:32:38 2016 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 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
@@ -61,7 +61,6 @@
             "-d", BIN.toString(),
             "--state-dir=" + BIN,
             "-j", "10",
-            SERVER_ARG,
             "--log=debug");
   }
 }
--- a/langtools/test/tools/sjavac/PermittedArtifact.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/PermittedArtifact.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
@@ -63,8 +63,7 @@
                 "--permit-artifact=" + BIN + "/alfa/omega/AA.class",
                 "-src", GENSRC.toString(),
                 "-d", BIN.toString(),
-                "--state-dir=" + BIN,
-                SERVER_ARG);
+                "--state-dir=" + BIN);
 
         Map<String,Long> new_bin_state = collectState(BIN);
         verifyThatFilesHaveBeenAdded(previous_bin_state, new_bin_state,
--- a/langtools/test/tools/sjavac/SJavacTester.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/SJavacTester.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
@@ -30,10 +30,6 @@
 
 public class SJavacTester {
 
-    static final String SERVER_ARG = "--server:"
-            + "portfile=testportfile,"
-            + "background=false";
-
     final ToolBox tb = new ToolBox();
     final Path TEST_ROOT = Paths.get(getClass().getSimpleName());
 
@@ -90,7 +86,6 @@
                 "--state-dir=" + BIN,
                 "-h", HEADERS.toString(),
                 "-j", "1",
-                SERVER_ARG,
                 "--log=debug");
     }
 
--- a/langtools/test/tools/sjavac/StateDir.java	Fri Jan 22 21:00:26 2016 +0100
+++ b/langtools/test/tools/sjavac/StateDir.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
@@ -59,8 +59,7 @@
 
         compile("--state-dir=" + BAR,
                 "-src", GENSRC.toString(),
-                "-d", BIN.toString(),
-                SJavacTester.SERVER_ARG);
+                "-d", BIN.toString());
 
         Map<String,Long> new_bin_state = collectState(BIN);
         verifyThatFilesHaveBeenAdded(previous_bin_state, new_bin_state,