(1) sun.tools.javac.main is about as cross-platform as you can get. (2) Call project.init() early. (3) Add a build listener, you won't see diddly without it. (4) Baby steps. Get simple things working first, then ramp up.
Paul > -----Original Message----- > From: Jay Riddell [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 13, 2002 5:07 PM > To: Ant Users List; Erik Hatcher; [EMAIL PROTECTED] > Subject: RE: Calling Ant from Java: An example please ? > > > Yes, that would be an option . . . but a more time-intensive > option than > I was hoping for ;-) > ----- > > Also, Mark asked why didn't I just call the compiler (instead of Ant)? > Because I am trying to write cross-platform code and I was planning > on using Ant as my "cross-platform compiler". > > ----- > > Unless significant effort is put in to add explanatory text > (such as the truly useful Log4j javadocs), the Javadocs alone cannot > tell you what to do. I have seen Project.createTask(). However, > it seems to be yet-another-possible path . . . as the path that I > nearly-arbitrarily chose is another path. However, without > GUIDANCE or a Working Example, it is difficult to pick the best path > to accomplish what I need. > > (Not meaning to sound . . . belligerent, just frustrated. I > was excited to > see the API and just frustrated that I can't figure out how > to use it.) > > Also, I have no real ties to the way I am doing it now; since > it doesn't > work, I'd be stupid to be wedded to it. Just looking for a > method that will > work. > > ----- > This is what I am doing right now: > > (Quoting from an earlier email): > > Here is the java code that I have written that attempts > to compile a "Hello, world" java file: > http://home.attbi.com/~theriddells/CompileIt.java > > And here are the results that I get: > http://home.attbi.com/~theriddells/results.txt > > (Note: The code has been updated to show that I have > added the Project.init() called...to no avail.) > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
