You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2010/05/18 04:25:50 UTC

svn commit: r945465 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java

Author: dkulp
Date: Tue May 18 02:25:49 2010
New Revision: 945465

URL: http://svn.apache.org/viewvc?rev=945465&view=rev
Log:
Send endorsed flags into forked compiler

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java?rev=945465&r1=945464&r2=945465&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java Tue May 18 02:25:49 2010
@@ -102,6 +102,7 @@ public class Compiler {
     }
     
     public boolean compileFiles(String[] files) {
+        String endorsed = System.getProperty("java.endorsed.dirs");
         if (!forceFork) {
             try { 
                 Class.forName("javax.tools.JavaCompiler");
@@ -135,6 +136,10 @@ public class Compiler {
         list.add(javacstr);
         // End of honoring java.home for used javac
 
+        if (!StringUtils.isEmpty(endorsed)) {
+            list.add("-endorseddirs");
+            list.add(endorsed);
+        }
 
         //fix for CXF-2081, set maximum heap of this VM to javac.
         list.add("-J-Xmx" + maxMemory);