langtools/test/tools/javac/T6405099.java
changeset 36526 3b41f1c69604
parent 30730 d3ce7619db2c
equal deleted inserted replaced
36525:4caf88912b7f 36526:3b41f1c69604
    47         }
    47         }
    48     }
    48     }
    49 
    49 
    50     static void test(File dir) {
    50     static void test(File dir) {
    51         String[] args = {
    51         String[] args = {
    52             "-extdirs", dir.getPath(), "-d", ".",
    52             "-source", "8", "-target", "8", // -extdirs not allowed after -target 8
       
    53             "-extdirs", dir.getPath(),
       
    54             "-d", ".",
    53             new File(System.getProperty("test.src", "."), "T6405099.java").getPath()
    55             new File(System.getProperty("test.src", "."), "T6405099.java").getPath()
    54         };
    56         };
    55 
    57 
    56         StringWriter sw = new StringWriter();
    58         StringWriter sw = new StringWriter();
    57         PrintWriter pw = new PrintWriter(sw);
    59         PrintWriter pw = new PrintWriter(sw);
    58         int rc = com.sun.tools.javac.Main.compile(args, pw);
    60         int rc = com.sun.tools.javac.Main.compile(args, pw);
       
    61         pw.close();
       
    62         System.out.println(sw);
       
    63 
    59         if (rc != 0)
    64         if (rc != 0)
    60             throw new Error("compilation failed");
    65             throw new Error("compilation failed");
    61 
       
    62         System.out.println(sw);
       
    63     }
    66     }
    64 }
    67 }