langtools/test/tools/javac/file/ExplodedImage.java
changeset 36778 e04318f39f92
parent 36526 3b41f1c69604
child 36991 7f814aac1f80
equal deleted inserted replaced
36777:28d33fb9097f 36778:e04318f39f92
     1 /*
     1 /*
     2  * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    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 import com.sun.source.util.JavacTask;
    24 /**
    25 import com.sun.tools.javac.code.Symbol.ClassSymbol;
    25  * @test
       
    26  * @bug 8067138
       
    27  * @summary Verify that compiling against the exploded JDK image works, and that Locations close
       
    28  *          the directory streams properly when working with exploded JDK image.
       
    29  * @library /tools/lib
       
    30  * @modules jdk.compiler/com.sun.tools.javac.api
       
    31  *          jdk.compiler/com.sun.tools.javac.code
       
    32  *          jdk.compiler/com.sun.tools.javac.main
       
    33  *          jdk.jdeps/com.sun.tools.javap
       
    34  * @build toolbox.ToolBox ExplodedImage
       
    35  * @run main/othervm ExplodedImage modules/* testDirectoryStreamClosed
       
    36  * @run main/othervm ExplodedImage modules/* testCanCompileAgainstExplodedImage
       
    37  */
       
    38 
    26 import java.io.File;
    39 import java.io.File;
    27 import java.io.IOException;
    40 import java.io.IOException;
    28 import java.io.InputStream;
    41 import java.io.InputStream;
    29 import java.net.URI;
    42 import java.net.URI;
    30 import java.nio.file.DirectoryStream;
    43 import java.nio.file.DirectoryStream;
    41 import javax.tools.JavaFileObject;
    54 import javax.tools.JavaFileObject;
    42 import javax.tools.StandardJavaFileManager;
    55 import javax.tools.StandardJavaFileManager;
    43 import javax.tools.StandardLocation;
    56 import javax.tools.StandardLocation;
    44 import javax.tools.ToolProvider;
    57 import javax.tools.ToolProvider;
    45 
    58 
    46 /**
    59 import com.sun.source.util.JavacTask;
    47  * @test
    60 import com.sun.tools.javac.code.Symbol.ClassSymbol;
    48  * @bug 8067138
    61 
    49  * @summary Verify that compiling against the exploded JDK image works, and that Locations close
    62 import toolbox.ToolBox;
    50  *          the directory streams properly when working with exploded JDK image.
       
    51  * @library /tools/lib
       
    52  * @modules jdk.compiler/com.sun.tools.javac.api
       
    53  *          jdk.compiler/com.sun.tools.javac.code
       
    54  *          jdk.compiler/com.sun.tools.javac.file
       
    55  *          jdk.compiler/com.sun.tools.javac.main
       
    56  *          jdk.jdeps/com.sun.tools.javap
       
    57  * @build ToolBox ExplodedImage
       
    58  * @run main/othervm ExplodedImage modules/* testDirectoryStreamClosed
       
    59  * @run main/othervm ExplodedImage modules/* testCanCompileAgainstExplodedImage
       
    60  */
       
    61 
    63 
    62 public class ExplodedImage {
    64 public class ExplodedImage {
    63     public static void main(String... args) throws IOException {
    65     public static void main(String... args) throws IOException {
    64         new ExplodedImage().run(args);
    66         new ExplodedImage().run(args);
    65     }
    67     }