dims        01/09/10 11:27:55

  Modified:    src/org/apache/cocoon/components/language/programming/java
                        Tag: cocoon_20_branch JavaLanguage.java Javac.java
               webapp   Tag: cocoon_20_branch cocoon.xconf
  Log:
  - Add boot class path so that Jikes can work out of the box.
  - One more try/catch when parsing compiler errors.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.6   +3 -1      
xml-cocoon2/src/org/apache/cocoon/components/language/programming/java/JavaLanguage.java
  
  Index: JavaLanguage.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/components/language/programming/java/JavaLanguage.java,v
  retrieving revision 1.2.2.5
  retrieving revision 1.2.2.6
  diff -u -r1.2.2.5 -r1.2.2.6
  --- JavaLanguage.java 2001/08/29 17:26:51     1.2.2.5
  +++ JavaLanguage.java 2001/09/10 18:27:55     1.2.2.6
  @@ -31,7 +31,7 @@
    * The Java programming language processor
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Ricardo Rocha</a>
  - * @version CVS $Revision: 1.2.2.5 $ $Date: 2001/08/29 17:26:51 $
  + * @version CVS $Revision: 1.2.2.6 $ $Date: 2001/09/10 18:27:55 $
    */
   public class JavaLanguage extends CompiledProgrammingLanguage implements 
ThreadSafe, Composable, Disposable {
   
  @@ -158,6 +158,7 @@
   
         compiler.setDestination(baseDirectory.getCanonicalPath());
   
  +      String systemBootClasspath = System.getProperty("sun.boot.class.path");
         String systemClasspath = System.getProperty("java.class.path");
         String systemExtDirs = System.getProperty("java.ext.dirs");
         String systemExtClasspath = null;
  @@ -171,6 +172,7 @@
         compiler.setClasspath(
           baseDirectory.getCanonicalPath() +
           ((classpath != null) ? File.pathSeparator + classpath : "") +
  +        ((systemBootClasspath != null) ? File.pathSeparator + systemBootClasspath : 
"") +
           ((systemClasspath != null) ? File.pathSeparator + systemClasspath : "") +
           ((systemExtClasspath != null) ? File.pathSeparator + systemExtClasspath : 
"")
         );
  
  
  
  1.2.2.5   +7 -5      
xml-cocoon2/src/org/apache/cocoon/components/language/programming/java/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/components/language/programming/java/Javac.java,v
  retrieving revision 1.2.2.4
  retrieving revision 1.2.2.5
  diff -u -r1.2.2.4 -r1.2.2.5
  --- Javac.java        2001/09/04 15:14:32     1.2.2.4
  +++ Javac.java        2001/09/10 18:27:55     1.2.2.5
  @@ -26,7 +26,7 @@
    * This class wraps the Sun's Javac Compiler.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stefano Mazzocchi</a>
  - * @version $Revision: 1.2.2.4 $ $Date: 2001/09/04 15:14:32 $
  + * @version $Revision: 1.2.2.5 $ $Date: 2001/09/10 18:27:55 $
    * @since 2.0
    */
   
  @@ -140,8 +140,9 @@
         int endcolumn = context.indexOf(" ", startcolumn);
         if (endcolumn == -1) endcolumn = context.length();
         return new CompilerError(file, false, line, startcolumn, line, endcolumn, 
message);
  -    }
  -    catch(NoSuchElementException nse) {
  +    } catch(NoSuchElementException nse) {
  +      return new CompilerError("no more tokens - could not parse error message: " + 
error);
  +    } catch(Exception nse) {
         return new CompilerError("could not parse error message: " + error);
       }
     }
  @@ -207,8 +208,9 @@
         if (endcolumn == -1) endcolumn = context.length();
   
         return new CompilerError(srcDir + File.separator + file, true, line, 
startcolumn, line, endcolumn, message);
  -    }
  -    catch(NoSuchElementException nse) {
  +    } catch(NoSuchElementException nse) {
  +      return new CompilerError("no more tokens - could not parse error message: " + 
error);
  +    } catch(Exception nse) {
         return new CompilerError("could not parse error message: " + error);
       }
     }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.7.2.23  +1 -2      xml-cocoon2/webapp/cocoon.xconf
  
  Index: cocoon.xconf
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/webapp/cocoon.xconf,v
  retrieving revision 1.7.2.22
  retrieving revision 1.7.2.23
  diff -u -r1.7.2.22 -r1.7.2.23
  --- cocoon.xconf      2001/09/10 10:59:58     1.7.2.22
  +++ cocoon.xconf      2001/09/10 18:27:55     1.7.2.23
  @@ -115,8 +115,7 @@
         <!-- compiler parameter specifies which class to use to compile Java.
              Possible variants are Javac and Jikes compilers.
              Javac requires javac.jar (included with Cocoon distribution).
  -           Jikes requires IBM jikes compiler installed and rt.jar from
  -           JRE in the classpath environment variable. -->
  +           Jikes requires IBM jikes compiler to be present in the PATH  -->
         <parameter name="compiler" 
value="org.apache.cocoon.components.language.programming.java.Javac"/>
         <!-- Specifies which formatter to use to format source code.
              This parameter is optional. -->
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to