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 * /test/lib
32 * @build jdk.test.lib.compiler.CompilerUtils
33 * jdk.test.lib.util.FileUtils
34 * jdk.test.lib.Platform
35 * FileServerHandler JarUtils
36 * @run main/othervm CloseTest
37 * @summary URL-downloaded jar files can consume all available file descriptors
38 */
39
40 import java.io.File;
41 import java.io.IOException;
42 import java.lang.reflect.Method;
43 import java.net.URLClassLoader;
44 import java.net.InetSocketAddress;
45 import java.net.URL;
46 import java.nio.file.Files;
47 import java.nio.file.Path;
48 import java.nio.file.Paths;
49
50 import jdk.test.lib.compiler.CompilerUtils;
51
52 import com.sun.net.httpserver.HttpContext;
53 import com.sun.net.httpserver.HttpServer;
54
55 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
56
57 public class CloseTest extends Common {
58 private static final String WORK_DIR = System.getProperty("user.dir")
59 + "/";
60 //
61 // needs two jar files test1.jar and test2.jar with following structure
62 //
63 // com/foo/TestClass
64 // com/foo/TestClass1
65 // com/foo/Resource1
66 // com/foo/Resource2
67 //
68 // and a directory hierarchy with the same structure/contents
69
70 public static void main(String args[]) throws Exception {
|
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 * /test/lib
32 * @build jdk.test.lib.compiler.CompilerUtils
33 * jdk.test.lib.util.FileUtils
34 * jdk.test.lib.util.JarUtils
35 * jdk.test.lib.Platform
36 * FileServerHandler
37 * @run main/othervm CloseTest
38 * @summary URL-downloaded jar files can consume all available file descriptors
39 */
40
41 import java.io.File;
42 import java.io.IOException;
43 import java.lang.reflect.Method;
44 import java.net.URLClassLoader;
45 import java.net.InetSocketAddress;
46 import java.net.URL;
47 import java.nio.file.Files;
48 import java.nio.file.Path;
49 import java.nio.file.Paths;
50
51 import jdk.test.lib.compiler.CompilerUtils;
52 import jdk.test.lib.util.JarUtils;
53
54 import com.sun.net.httpserver.HttpContext;
55 import com.sun.net.httpserver.HttpServer;
56
57 import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
58
59 public class CloseTest extends Common {
60 private static final String WORK_DIR = System.getProperty("user.dir")
61 + "/";
62 //
63 // needs two jar files test1.jar and test2.jar with following structure
64 //
65 // com/foo/TestClass
66 // com/foo/TestClass1
67 // com/foo/Resource1
68 // com/foo/Resource2
69 //
70 // and a directory hierarchy with the same structure/contents
71
72 public static void main(String args[]) throws Exception {
|