equal
deleted
inserted
replaced
54 |
54 |
55 import static javax.tools.StandardLocation.SOURCE_PATH; |
55 import static javax.tools.StandardLocation.SOURCE_PATH; |
56 |
56 |
57 public class LocalVariableInferenceTester { |
57 public class LocalVariableInferenceTester { |
58 |
58 |
59 static final JavaCompiler comp = ToolProvider.getSystemJavaCompiler(); |
59 static final StandardJavaFileManager fm; |
60 static final StandardJavaFileManager fm = comp.getStandardFileManager(null, null, null); |
60 |
|
61 static { |
|
62 final JavaCompiler comp = ToolProvider.getSystemJavaCompiler(); |
|
63 fm = comp.getStandardFileManager(null, null, null); |
|
64 File destDir = new File(System.getProperty("user.dir")); |
|
65 try { |
|
66 fm.setLocation(javax.tools.StandardLocation.CLASS_OUTPUT, Arrays.asList(destDir)); |
|
67 } catch (IOException ex) { |
|
68 throw new AssertionError(ex); |
|
69 } |
|
70 } |
61 |
71 |
62 public static void main(String[] args) throws IOException { |
72 public static void main(String[] args) throws IOException { |
63 try { |
73 try { |
64 if (args.length != 1) { |
74 if (args.length != 1) { |
65 System.err.println("Usage: LocalVariableInferenceTester <sourcefile>"); |
75 System.err.println("Usage: LocalVariableInferenceTester <sourcefile>"); |