Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 64664 invoked from network); 9 May 2000 19:46:24 -0000 Received: from npri54exc11.npt.nuwc.navy.mil (firewall-user@129.190.70.82) by locus.apache.org with SMTP; 9 May 2000 19:46:24 -0000 Received: by NPRI54EXC11.NPT.NUWC.NAVY.MIL with Internet Mail Service (5.5.2651.58) id ; Tue, 9 May 2000 15:46:18 -0400 Message-ID: <731422FC2FCAD211B91C0008C75D890A1E54AB@NPRI54EXC20.NPT.NUWC.NAVY.MIL> From: Burkley Frederick G NPRI To: "'ant-dev@jakarta.apache.org'" Subject: RE: javac problems Date: Tue, 9 May 2000 15:46:20 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2651.58) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N Hello, I am new to the ant dev group, so am not sure if this is the "proper" way to respond. But here I go... I ran into the same thing. Im my case, I am running JDK1.1.8 on NT. My Path was set to Path=C:\WINNT\system32;C:\WINNT;D:\jdk1.1.8\bin;D:\Program Files\Lemmy Note that there is a JVM with NT under C:\WINNT\system32. That is, C:\WINNT\system32\java.exe. Part of the ant code checks (at run time) to see what version of the JVM is in use. Because I had C:\WINNT\system32\java.exe in my Path, that answer came up 1.2.2. That is, ant asks the JVM what version it is. After this, javac is called. There is no javac under C:\WINNT\system32\, so the javac that gets executed is under D:\jdk1.1.8\bin. So the 1.1.8 javac gets called with a "-sourcepath" command line option that is good for JDK1.2, but not JDK1.1 I rearranged my Path and this solved the problem. I rearranged it to Path=D:\jdk1.1.8\bin;C:\WINNT\system32;C:\WINNT;D:\Program Files\Lemmy Check the method detectJavaVersion() in the file %ANT_HOME%\src\main\org\apache\tools\ant\Project.java to see this. Fred Burkley -----Original Message----- From: Bryan Galligan [mailto:bGalligan@drkoop.com] Sent: Tuesday, May 09, 2000 12:04 PM To: ant-dev@jakarta.apache.org Subject: javac problems i am trying to get this build file to work but i keep getting an error that says: Compiling 70 source files to /home/cujo/cujo/BOB/build javac: invalid flag: -sourcepath use: javac [-g][-O][-debug][-depend][-nowarn][-verbose][-classpath path][-nowrite][-deprecation][-d dir][-J] file.java... why am i getting this error and what does it mean? in my buildfile i have defined a srcdir like so: where build and src are both defined in the first target. why isn't it getting all the java files and compiling them instead of outputting this sourcepath error? could this have something to do with the classpath? thanks bryan