Pretty simple, using File as the setter type so that it will be resolved
relative to project basedir.
By the way, I noticed that since <javah> uses in-VM-loading on
com.sun.tools.javah.Main, while this is usually OK (since main() is not
called), if there is an error signaled by the javah tool, the Ant VM exits!
That is, the System.exit(0) is bypassed, but not the System.exit(15) from
Util.error. Maybe forking would be better.
-Jesse
--
Jesse Glick <mailto:[EMAIL PROTECTED]>
NetBeans, Open APIs <http://www.netbeans.org/>
tel (+4202) 3300-9161 Sun Micro x49161 Praha CR
Index: src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
===================================================================
RCS file:
/home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java,v
retrieving revision 1.1
diff -u -r1.1 Javah.java
--- src/main/org/apache/tools/ant/taskdefs/optional/Javah.java 2000/11/28
17:06:21 1.1
+++ src/main/org/apache/tools/ant/taskdefs/optional/Javah.java 2001/03/08
20:20:26
@@ -105,7 +105,7 @@
private String cls;
private File destDir;
private Path classpath = null;
- private String outputFile = null;
+ private File outputFile = null;
private boolean verbose = false;
private boolean force = false;
private boolean old = false;
@@ -215,7 +215,7 @@
/**
* Set the output file name.
*/
- public void setOutputFile(String outputFile) {
+ public void setOutputFile(File outputFile) {
this.outputFile = outputFile;
}
@@ -354,7 +354,7 @@
if (outputFile != null) {
cmd.createArgument().setValue("-o");
- cmd.createArgument().setValue(outputFile);
+ cmd.createArgument().setFile(outputFile);
}
if (classpath != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]