I am trying to run a build file that is failing on the javac task. The problem is that my default javac.exe as defined in my Path command is a 1.4 compiler (it has to remain t his way). I am running ant in eclipse and in eclipse I am using a 1.5 sdk.
Here is my javac target:
<target name = "build" depends = "init" description="build all">
<javac
srcdir="${src.dir}" destdir="${build.dir}"
target= "C:\_Tools\jdk1.5.0_07\bin\javac.exe"
source = "1.5"
fork = "yes"
includes="**">
<classpath refid = "classpath"/>
</javac>
</target>
The error I am getting is:
javac: invalid target release: C:\_Tools\jdk1.5.0_07\bin\javac.exe
I have tried it without the target attribute and it gives me a
invalid source release: 1.5
error.
It seems that ant is running from my default javac and not the 1.5. Does anybody know how I can specify a specific javac for ant to use? I thought the target attribute was supposed to do that.
I am using XP and my JAVA_HOME is set to C:\Program Files\Java\jdk1.5.0_07\bin.
Thank you in advance.
Jeff Sulman
Here is my javac target:
<target name = "build" depends = "init" description="build all">
<javac
srcdir="${src.dir}" destdir="${build.dir}"
target= "C:\_Tools\jdk1.5.0_07\bin\javac.exe"
source = "1.5"
fork = "yes"
includes="**">
<classpath refid = "classpath"/>
</javac>
</target>
The error I am getting is:
javac: invalid target release: C:\_Tools\jdk1.5.0_07\bin\javac.exe
I have tried it without the target attribute and it gives me a
invalid source release: 1.5
error.
It seems that ant is running from my default javac and not the 1.5. Does anybody know how I can specify a specific javac for ant to use? I thought the target attribute was supposed to do that.
I am using XP and my JAVA_HOME is set to C:\Program Files\Java\jdk1.5.0_07\bin.
Thank you in advance.
Jeff Sulman