You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by Sean Brandt <se...@bwcgroup.com> on 2003/09/16 14:57:33 UTC
[PATCH] Add to ways to find javac in CodeGenUtil
The code assumes that java.home is pointing to the jre directory inside
an sdk install ( which IMHO is incorrect ). This patch tests for javac
in {java.home}/bin/javac{.exe} as well as the odd ../bin location it
previously searched.
-Sean
-----
Index: src/xmlcomp/org/apache/xmlbeans/impl/tool/CodeGenUtil.java
===================================================================
RCS file:
/home/cvspublic/xml-xmlbeans/v1/src/xmlcomp/org/apache/xmlbeans/impl/tool/CodeGenUtil.java,v
retrieving revision 1.1
diff -u -r1.1 CodeGenUtil.java
--- src/xmlcomp/org/apache/xmlbeans/impl/tool/CodeGenUtil.java 15 Sep
2003 18:20:33 -0000 1.1
+++ src/xmlcomp/org/apache/xmlbeans/impl/tool/CodeGenUtil.java 16 Sep
2003 12:57:00 -0000
@@ -401,6 +401,16 @@
return result;
}
+ result = new File(home + sep + "bin",tool);
+ if ( result.isFile()) {
+ return result;
+ }
+
+ result = new File(result.getPath() + ".exe");
+ if (result.isFile()) {
+ return result;
+ }
+
// just return the original toolFile and hope that it is on the
PATH.
return toolFile;
}
- ---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/