kinman      2003/09/26 16:19:32

  Modified:    jasper2/src/share/org/apache/jasper/compiler Compiler.java
  Log:
  - Support java extension direcotries when invoking javac.
  
  Revision  Changes    Path
  1.70      +12 -3     
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- Compiler.java     24 Aug 2003 01:18:44 -0000      1.69
  +++ Compiler.java     26 Sep 2003 23:19:32 -0000      1.70
  @@ -340,13 +340,13 @@
           // Initializing classpath
           Path path = new Path(project);
           path.setPath(System.getProperty("java.class.path"));
  -        info.append("     cp=" + System.getProperty("java.class.path") + "\n");
  +        info.append("    cp=" + System.getProperty("java.class.path") + "\n");
           StringTokenizer tokenizer = new StringTokenizer(classpath, sep);
           while (tokenizer.hasMoreElements()) {
               String pathElement = tokenizer.nextToken();
               File repository = new File(pathElement);
               path.setLocation(repository);
  -            info.append("     cp=" + repository + "\n");
  +            info.append("    cp=" + repository + "\n");
           }
   
           if( log.isDebugEnabled() )
  @@ -357,7 +357,16 @@
           Path srcPath = new Path(project);
           srcPath.setLocation(options.getScratchDir());
   
  -        info.append("     work dir=" + options.getScratchDir() + "\n");
  +        info.append("    work dir=" + options.getScratchDir() + "\n");
  +
  +        // Initialize and set java extensions
  +        String exts = System.getProperty("java.ext.dirs");
  +        if (exts != null) {
  +            Path extdirs = new Path(project);
  +            extdirs.setPath(exts);
  +            javac.setExtdirs(extdirs);
  +            info.append("    extension dir=" + exts + "\n");
  +        }
   
           // Configure the compiler object
           javac.setEncoding(javaEncoding);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to