jdk/src/jdk.rmic/share/classes/sun/rmi/rmic/BatchEnvironment.java
changeset 27565 729f9700483a
parent 25859 3317bb8137f4
child 28856 1c525c8d1cf7
equal deleted inserted replaced
27564:eaaa79b68cd5 27565:729f9700483a
    68 
    68 
    69     /**
    69     /**
    70      * Create a ClassPath object for rmic from a class path string.
    70      * Create a ClassPath object for rmic from a class path string.
    71      */
    71      */
    72     public static ClassPath createClassPath(String classPathString) {
    72     public static ClassPath createClassPath(String classPathString) {
    73         ClassPath[] paths = classPaths(null, classPathString, null, null);
    73         ClassPath[] paths = classPaths(null, classPathString, null);
    74         return paths[1];
    74         return paths[1];
    75     }
    75     }
    76 
    76 
    77     /**
    77     /**
    78      * Create a ClassPath object for rmic from the relevant command line
    78      * Create a ClassPath object for rmic from the relevant command line
    79      * options for class path, boot class path, and extension directories.
    79      * options for class path and boot class path.
    80      */
    80      */
    81     public static ClassPath createClassPath(String classPathString,
    81     public static ClassPath createClassPath(String classPathString,
    82                                             String sysClassPathString,
    82                                             String sysClassPathString)
    83                                             String extDirsString)
       
    84     {
    83     {
    85         /**
    84         /**
    86          * Previously, this method delegated to the
    85          * Previously, this method delegated to the
    87          * sun.tools.javac.BatchEnvironment.classPaths method in order
    86          * sun.tools.javac.BatchEnvironment.classPaths method in order
    88          * to supply default values for paths not specified on the
    87          * to supply default values for paths not specified on the
   106          * Class-Path manifest entries are supported for JAR files
   105          * Class-Path manifest entries are supported for JAR files
   107          * everywhere except in the boot class path.
   106          * everywhere except in the boot class path.
   108          */
   107          */
   109         path.expandJarClassPaths(true);
   108         path.expandJarClassPaths(true);
   110 
   109 
   111         if (extDirsString == null) {
       
   112             extDirsString = System.getProperty("java.ext.dirs");
       
   113         }
       
   114         if (extDirsString != null) {
       
   115             path.addDirectories(extDirsString);
       
   116         }
       
   117 
       
   118         /*
   110         /*
   119          * In the application class path, an empty element means
   111          * In the application class path, an empty element means
   120          * the current working directory.
   112          * the current working directory.
   121          */
   113          */
   122         path.emptyPathDefault(".");
   114         path.emptyPathDefault(".");
   387 
   379 
   388             if (ele.isFile()) {
   380             if (ele.isFile()) {
   389                 /* File is an ordinay file  */
   381                 /* File is an ordinay file  */
   390                 String arcname = file.toLowerCase();
   382                 String arcname = file.toLowerCase();
   391                 if (! (arcname.endsWith(".zip") ||
   383                 if (! (arcname.endsWith(".zip") ||
   392                        arcname.endsWith(".jar"))) {
   384                        arcname.endsWith(".jar") ||
       
   385                        arcname.endsWith(".jimage"))) {
   393                     /* File name don't have right extension */
   386                     /* File name don't have right extension */
   394 //                      if (warn)
   387 //                      if (warn)
   395 //                          log.warning(Position.NOPOS,
   388 //                          log.warning(Position.NOPOS,
   396 //                              "invalid.archive.file", file);
   389 //                              "invalid.archive.file", file);
   397                     return;
   390                     return;