Question : how to run ant with j2sdk1.4.2.19

Hi,

My computer classpath, path etc set up for j2sdk 1.5 to run eclipse 3.4.1. I need to run the ant scripts from command prompt through j2sdk1.4.2.19.
I am giving command like

>>>>ant -buildfile build.xml
which by default run through j2sdk1.5.

How can i change above command or give additional option command to run through j2sdk1.4.2.19.

Any ideas, sample code, resources , links highly appreciated. Thanks in advance

Answer : how to run ant with j2sdk1.4.2.19

You can set JAVA_HOME locally, in the command prompt. When you do that, it will only affect the current prompt, and nothing else on the machine.
To do so write, in the command prompt
set JAVA_HOME=xxx
You may find it easier to create a batch file to run your ant in jdk 1.4, instead of doing this every time. When you run a batch file the JAVA_HOME will change only for that execution. The batch file will look like this:
@echo off
set JAVA_HOME=xxx
ant ...
Random Solutions  
 
programming4us programming4us