test/testlibrary/ctw/src/sun/hotspot/tools/ctw/ClassPathJarEntry.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8024678 Sdiff test/testlibrary/ctw/src/sun/hotspot/tools/ctw

test/testlibrary/ctw/src/sun/hotspot/tools/ctw/ClassPathJarEntry.java

Print this page
rev 5310 : [mq]: 8024678


  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 package sun.hotspot.tools.ctw;
  25 
  26 import java.net.MalformedURLException;
  27 import java.net.URL;
  28 import java.net.URLClassLoader;
  29 import java.util.*;
  30 import java.util.jar.*;
  31 import java.util.concurrent.Executor;
  32 
  33 import java.io.*;
  34 import java.nio.file.*;
  35 
  36 /**
  37  * Handler for jar-files containing classes to compile.
  38  * @author igor.ignatyev@oracle.com
  39  */
  40 public class ClassPathJarEntry extends PathHandler {
  41 
  42     public ClassPathJarEntry(Path root, Executor executor) {
  43         super(root, executor);
  44         try {
  45             URL url = root.toUri().toURL();
  46             setLoader(new URLClassLoader(new URL[]{url}));
  47         } catch (MalformedURLException e) {
  48             e.printStackTrace();
  49         }
  50     }
  51 
  52     @Override
  53     public void process() {
  54         System.out.println("# jar: " + root);
  55         if (!Files.exists(root)) {
  56             return;
  57         }
  58         try {




  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 package sun.hotspot.tools.ctw;
  25 
  26 import java.net.MalformedURLException;
  27 import java.net.URL;
  28 import java.net.URLClassLoader;
  29 import java.util.*;
  30 import java.util.jar.*;
  31 import java.util.concurrent.Executor;
  32 
  33 import java.io.*;
  34 import java.nio.file.*;
  35 
  36 /**
  37  * Handler for jar-files containing classes to compile.

  38  */
  39 public class ClassPathJarEntry extends PathHandler {
  40 
  41     public ClassPathJarEntry(Path root, Executor executor) {
  42         super(root, executor);
  43         try {
  44             URL url = root.toUri().toURL();
  45             setLoader(new URLClassLoader(new URL[]{url}));
  46         } catch (MalformedURLException e) {
  47             e.printStackTrace();
  48         }
  49     }
  50 
  51     @Override
  52     public void process() {
  53         System.out.println("# jar: " + root);
  54         if (!Files.exists(root)) {
  55             return;
  56         }
  57         try {


test/testlibrary/ctw/src/sun/hotspot/tools/ctw/ClassPathJarEntry.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File