summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.loader/TestMultiple.java
blob: 1a56fc4878c6ccceee458b76dad0b2d4a90fb8c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import java.net.*;

public class TestMultiple
{
  public static void main (String[] args)
  {
    URLClassLoader ucl = 
      (URLClassLoader) ClassLoader.getSystemClassLoader();
    URL urls[] = ucl.getURLs ();

    MyLoader t1 = new MyLoader (urls);
    MyLoader t2 = new MyLoader (urls);

    Class c1, c2;

    try {

      c1 = t1.loadClass ("dummy");
      c2 = t2.loadClass ("dummy");

    } 
    catch (Exception e) {
	e.printStackTrace ();
    }
  }
}