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:[EMAIL PROTECTED] Sent: Tuesday, May 09, 2000 12:04 PM To: [EMAIL PROTECTED] 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<runtime flag>] file.java... why am i getting this error and what does it mean? in my buildfile i have defined a srcdir like so: <target name="compile3" depends="prepare"> <javac srcdir="${src}" destdir="${build}" includes="**/*.java" filtering="on" debug="on" /> </target> 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
