< prev index next >

test/tools/jlink/bindservices/BindServices.java

Print this page
rev 17315 : 8181335: remove packageless CompilerUtils
Reviewed-by: duke


  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.io.File;
  25 import java.io.PrintWriter;
  26 import java.io.StringWriter;
  27 import java.nio.file.Files;
  28 import java.nio.file.Path;
  29 import java.nio.file.Paths;
  30 import java.util.ArrayList;
  31 import java.util.List;
  32 import java.util.spi.ToolProvider;
  33 import java.util.stream.Collectors;
  34 import java.util.stream.Stream;
  35 

  36 import static jdk.testlibrary.ProcessTools.*;
  37 
  38 import org.testng.annotations.BeforeTest;
  39 import org.testng.annotations.Test;
  40 import static org.testng.Assert.*;
  41 
  42 /**
  43  * @test
  44  * @bug 8174826
  45  * @library /lib/testlibrary
  46  * @modules jdk.compiler jdk.jlink
  47  * @build BindServices CompilerUtils jdk.testlibrary.ProcessTools
  48  * @run testng BindServices
  49  */
  50 
  51 public class BindServices {
  52     private static final String JAVA_HOME = System.getProperty("java.home");
  53     private static final String TEST_SRC = System.getProperty("test.src");
  54 
  55     private static final Path SRC_DIR = Paths.get(TEST_SRC, "src");
  56     private static final Path MODS_DIR = Paths.get("mods");
  57 
  58     private static final String MODULE_PATH =
  59         Paths.get(JAVA_HOME, "jmods").toString() +
  60             File.pathSeparator + MODS_DIR.toString();
  61 
  62     // the names of the modules in this test
  63     private static String[] modules = new String[] {"m1", "m2", "m3"};
  64 
  65 
  66     private static boolean hasJmods() {
  67         if (!Files.exists(Paths.get(JAVA_HOME, "jmods"))) {




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.io.File;
  25 import java.io.PrintWriter;
  26 import java.io.StringWriter;
  27 import java.nio.file.Files;
  28 import java.nio.file.Path;
  29 import java.nio.file.Paths;
  30 import java.util.ArrayList;
  31 import java.util.List;
  32 import java.util.spi.ToolProvider;
  33 import java.util.stream.Collectors;
  34 import java.util.stream.Stream;
  35 
  36 import jdk.test.lib.compiler.CompilerUtils;
  37 import static jdk.testlibrary.ProcessTools.*;
  38 
  39 import org.testng.annotations.BeforeTest;
  40 import org.testng.annotations.Test;
  41 import static org.testng.Assert.*;
  42 
  43 /**
  44  * @test
  45  * @bug 8174826
  46  * @library /lib/testlibrary /test/lib
  47  * @modules jdk.compiler jdk.jlink
  48  * @build BindServices jdk.test.lib.compiler.CompilerUtils jdk.testlibrary.ProcessTools
  49  * @run testng BindServices
  50  */
  51 
  52 public class BindServices {
  53     private static final String JAVA_HOME = System.getProperty("java.home");
  54     private static final String TEST_SRC = System.getProperty("test.src");
  55 
  56     private static final Path SRC_DIR = Paths.get(TEST_SRC, "src");
  57     private static final Path MODS_DIR = Paths.get("mods");
  58 
  59     private static final String MODULE_PATH =
  60         Paths.get(JAVA_HOME, "jmods").toString() +
  61             File.pathSeparator + MODS_DIR.toString();
  62 
  63     // the names of the modules in this test
  64     private static String[] modules = new String[] {"m1", "m2", "m3"};
  65 
  66 
  67     private static boolean hasJmods() {
  68         if (!Files.exists(Paths.get(JAVA_HOME, "jmods"))) {


< prev index next >