Yeah, I had this problem the other day and these guys helped me to resolve it...
This is the solution that they came up with. I was compiling all my java source with
java 1.3 but wanted to build my javadocs using
java 1.4....
<target name="buildJavadoc" depends="initCommon" >
<!-- Build the javadoc in a seperate ant process so that we can use version
1.4 of the javadoc utility -->
<exec executable="ant">
<arg line="-buildfile ${ant.file} javadocCreate"/>
<env key="JAVA_HOME" value="${java_home1.4}"/>
</exec>
<echo message="Reverting back to Java ${ant.java.version} for remainder of
build..."/>
</target>
<target name="javadocCreate" depends="retrieveFileNamesForJavadoc" >
<javadoc sourcepath="${pcp_source_dir}:${parlay_src}:${parlay_rel4_src}"
classpath="${sdk_jar_file}:${corba_classpath_stuff}"
packageList="${working_directory}/tmpJavadocInput2"
....
....
Simon.
Stefan Bodewig wrote:
> On Thu, 18 Apr 2002, Gordon Tyler <[EMAIL PROTECTED]> wrote:
>
> > However, it seems that <javac fork=true> doesn't use the java.home
> > property to execute javac.
>
> Correct.
>
> Ant 1.5alpha has a new attribute in <javac> that lets you explicitly
> point Ant to the compiler you want to use.
>
> For 1.4.1 you can either <exec> a new instance of Ant like Diane
> suggests or set includejavaruntime and includeantruntime to false, add
> tools.jar of JDK 1.4.1 to <javac>'s <classpath> and don't use fork.
>
> Stefan
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
***************************************************************
* Simon Curran * Email : [EMAIL PROTECTED] *
* Software Engineer * WWW : www.aepona.com *
* Aepona Ltd. * Phone : +44 (0)28 9027 5231 *
* Interpoint Building, * Fax : +44 (0)28 9026 9111 *
* 20-24 York Street, * *
* Belfast. BT15 1AQ. * *
* N. Ireland. * *
***************************************************************