test/langtools/tools/javac/lvti/harness/LocalVariableInferenceTester.java
changeset 49437 9925be430918
parent 49294 3556298e481d
child 52377 907fdbbdf584
equal deleted inserted replaced
49436:0fdb76741c56 49437:9925be430918
    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>");