I'm so used to making sure I -don't- include the full path to the source
files in the srcdir attribute that it never occurred to me to do that for
this case, until Jesse suggested it. <doh!> I'm happy to say I've
implemented that suggestion, and it works perfectly fine. So the way
<javac> works is fine the way it is <yay!>.
For the record (might as well take this opportunity to find out whether
the way I coded it was goofy or not, maybe get some pointers :), here's
how I had changed Javac.java (I've scrunched up the indenting here just so
the lines don't hit overflow [I don't have any fancy font capability with
this mail]):
[binky] diff Javac.java Javac.java.orig
108d107
< private boolean flatten = false;
148,152d146
< // Allow for destDir to be only what was specified
< public void setFlatten(boolean flatten) {
< this.flatten = flatten;
< }
<
352,360c346,347
< File classFile = null ;
< if (flatten == true )
< {
< String filename = files[i].substring(0,files[i].indexOf(".java"));
< classFile = new File(destDir,new File(filename).getName() + ".class");
< }
< if(classFile == null) {
< classFile = new File(destDir, files[i].substring(0,
> files[i].indexOf(".java")) + ".class");
< }
---
> File classFile = new File(destDir, files[i].substring(0,
> files[i].indexOf(".java")) + ".class");
I'd wanted to use an "else" on the "if flatten...", instead of a second
"if", but for some reason I couldn't get that to work... but maybe that
was earlier on -- before I figured out you need to declare classFile
outside of the conditional (or so it seems anyway). I also tried just
having "if(flatten)" without the equals true, but that didn't seem to work
either (but that might have also been earlier on).
Thanks -- and thanks again for all the input, and the final solution,
Diane
=====
([EMAIL PROTECTED])
__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/