< prev index next >

test/java/net/URLClassLoader/closetest/CloseTest.java

Print this page
rev 17315 : 8181335: remove packageless CompilerUtils
Reviewed-by: duke


  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  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
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4167874
  27  * @modules java.logging
  28  *          jdk.httpserver
  29  *          jdk.compiler
  30  * @library ../../../../com/sun/net/httpserver
  31  *          /lib/testlibrary
  32  *          /test/lib
  33  * @build FileServerHandler JarUtils CompilerUtils
  34  * @run main/othervm CloseTest
  35  * @summary URL-downloaded jar files can consume all available file descriptors
  36  */
  37 
  38 import java.io.File;
  39 import java.io.IOException;
  40 import java.lang.reflect.Method;
  41 import java.net.URLClassLoader;
  42 import java.net.InetSocketAddress;
  43 import java.net.URL;
  44 import java.nio.file.Files;
  45 import java.nio.file.Path;
  46 import java.nio.file.Paths;
  47 


  48 import com.sun.net.httpserver.HttpContext;
  49 import com.sun.net.httpserver.HttpServer;
  50 
  51 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
  52 
  53 public class CloseTest extends Common {
  54     private static final String WORK_DIR = System.getProperty("user.dir")
  55             + "/";
  56 //
  57 // needs two jar files test1.jar and test2.jar with following structure
  58 //
  59 // com/foo/TestClass
  60 // com/foo/TestClass1
  61 // com/foo/Resource1
  62 // com/foo/Resource2
  63 //
  64 // and a directory hierarchy with the same structure/contents
  65 
  66     public static void main(String args[]) throws Exception {
  67         setup();




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  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
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 4167874
  27  * @modules java.logging
  28  *          jdk.httpserver
  29  *          jdk.compiler
  30  * @library ../../../../com/sun/net/httpserver
  31  *          /lib/testlibrary
  32  *          /test/lib
  33  * @build FileServerHandler JarUtils jdk.test.lib.compiler.CompilerUtils
  34  * @run main/othervm CloseTest
  35  * @summary URL-downloaded jar files can consume all available file descriptors
  36  */
  37 
  38 import java.io.File;
  39 import java.io.IOException;
  40 import java.lang.reflect.Method;
  41 import java.net.URLClassLoader;
  42 import java.net.InetSocketAddress;
  43 import java.net.URL;
  44 import java.nio.file.Files;
  45 import java.nio.file.Path;
  46 import java.nio.file.Paths;
  47 
  48 import jdk.test.lib.compiler.CompilerUtils;
  49 
  50 import com.sun.net.httpserver.HttpContext;
  51 import com.sun.net.httpserver.HttpServer;
  52 
  53 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
  54 
  55 public class CloseTest extends Common {
  56     private static final String WORK_DIR = System.getProperty("user.dir")
  57             + "/";
  58 //
  59 // needs two jar files test1.jar and test2.jar with following structure
  60 //
  61 // com/foo/TestClass
  62 // com/foo/TestClass1
  63 // com/foo/Resource1
  64 // com/foo/Resource2
  65 //
  66 // and a directory hierarchy with the same structure/contents
  67 
  68     public static void main(String args[]) throws Exception {
  69         setup();


< prev index next >