test/tools/sjavac/SJavac.java

changeset 1516
8943b4213f59
parent 1504
22e417cdddee
child 1953
71b0089b146f
equal deleted inserted replaced
1515:b61e5f801f7c 1516:8943b4213f59
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 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 20 * or visit www.oracle.com if you need additional information or have any
21 * questions. 21 * questions.
22 */ 22 */
23 23
24 /*
25 * @test
26 * @summary Test all aspects of sjavac.
27 *
28 * @bug 8004658
29 * @summary Add internal smart javac wrapper to solve JEP 139
30 *
31 * @run main SJavac
32 */
33
34 import java.util.*; 24 import java.util.*;
35 import java.io.*; 25 import java.io.*;
36 import java.net.*; 26 import java.net.*;
37 import java.nio.file.*; 27 import java.nio.file.*;
38 import java.nio.file.attribute.*; 28 import java.nio.file.attribute.*;
42 32
43 public 33 public
44 class SJavac { 34 class SJavac {
45 35
46 public static void main(String... args) throws Exception { 36 public static void main(String... args) throws Exception {
47 URL url = SJavac.class.getClassLoader().getResource("com/sun/tools/sjavac/Main.class");
48 if (url == null) {
49 // No sjavac in the classpath.
50 System.out.println("pass by default");
51 return;
52 }
53
54 SJavac s = new SJavac(); 37 SJavac s = new SJavac();
55 s.test(); 38 s.test();
56 } 39 }
57 40
58 FileSystem defaultfs = FileSystems.getDefault(); 41 FileSystem defaultfs = FileSystems.getDefault();

mercurial