langtools/test/tools/javac/T8010659/CompilerCrashWhenMixingBinariesAndSourcesTest.java
changeset 26100 bb7dd001d190
parent 16968 19f0da2d3143
child 30730 d3ce7619db2c
--- a/langtools/test/tools/javac/T8010659/CompilerCrashWhenMixingBinariesAndSourcesTest.java	Wed Aug 13 14:25:46 2014 -0400
+++ b/langtools/test/tools/javac/T8010659/CompilerCrashWhenMixingBinariesAndSourcesTest.java	Wed Aug 13 13:20:31 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, 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
@@ -27,7 +27,7 @@
  * @test
  * @bug 8010659
  * @summary Javac Crashes while building OpenJFX
- * @library /tools/javac/lib
+ * @library /tools/lib
  * @build ToolBox
  * @run main CompilerCrashWhenMixingBinariesAndSourcesTest
  */
@@ -48,19 +48,18 @@
             "        Object m(int i) {return null;}\n" +
             "}";
 
-    public static void main (String[] args) throws Exception{
-        ToolBox.JavaToolArgs javacParams = new ToolBox.JavaToolArgs()
-                .setSources(ASource, BSource, CSource, DSource);
-        ToolBox.javac(javacParams);
+    public static void main(String[] args) throws Exception {
+        ToolBox tb = new ToolBox();
+
+        tb.new JavacTask()
+                .sources(ASource, BSource, CSource, DSource)
+                .run();
 
-        ToolBox.rm("A.class");
-        ToolBox.rm("A$1.class");
-        ToolBox.rm("C.class");
-        ToolBox.rm("D.class");
+        tb.deleteFiles("A.class", "A$1.class", "C.class", "D.class");
 
-        javacParams = new ToolBox.JavaToolArgs()
-                .setOptions("-cp", ".")
-                .setSources(ASource, CSource, DSource);
-        ToolBox.javac(javacParams);
+        tb.new JavacTask()
+                .classpath(".")
+                .sources(ASource, CSource, DSource)
+                .run();
     }
 }