Hi Peter,

Sorry I apologize. It was mistake the correct path is as follows. This is
how I have set the path & it works.

Type the following the in the Command Prompt:

set ANT_HOME=C:\ant1.7
set JAVA_HOME=C:\jdk1.4
set PATH=%PATH%;%ANT_HOME%\bin

This will work. If you create a bat file you don't need to set the path
every time you just need to run the bat file. Type the following in a
notepad save it with the extension of .bat This will save you time on
setting the path.

ECHO OFF
CLS
set ANT_HOME=E:\ant
set JAVA_HOME=D:\jdk14
set PATH=%PATH%;%ANT_HOME%\bin
ver
ant -version
pause

Just let me know if this works for you

Thanks
Bye
Sumudu



On Dec 21, 2007 10:02 PM, Peter Reilly <[EMAIL PROTECTED]> wrote:

> JAVA_HOME should not be the bin directory of the java installation.
> It should be the jdk installation directotry - in your case:
> C:\tools\Java\jdk1.6.0_03
>
>
> This does *not* the same as the java.home system/ant property (which
> points to the jre).
>
>
> Use ant -diagnostics so see what ant thinks of the environment.
>
> Peter
>
>
> On Dec 21, 2007 4:12 PM, FREEMAN FIREFOX <[EMAIL PROTECTED]> wrote:
> > Hi Ravi,
> >
> > Set the JAVA_HOME as: C:\tools\Java\jdk1.6.0_03\bin
> >
> > and also the ANT_HOME should be set to the bin of the ANT.
> >
> > Setting the path to C:\toos\Java\jdk1.6.0_03 will result in compiler
> error.
> > Path should be set to bin
> >
> > Regards
> > Sumudu
> >
> >
> > On Dec 21, 2007 3:07 PM, Ravi Roy <[EMAIL PROTECTED]> wrote:
> >
> > > Hi All,
> > >
> > > I have strange error -  Error running
> > > C:\toos\Java\jdk1.6.0_03\bin\javac.exe compiler, I have Windows XP sp2
> > > with Ant 1.7.1alpha (my own Ant built version). I have a big project
> > > which compiles and build successfully but when JUnit tests starts and
> > > at compile time of junit tests it gives this error.
> > >
> > > I have installed JDK 1.6 under C:\tools and JAVA_HOME is set as
> > > environment variable to C:\toos\Java\jdk1.6.0_03. If I use ant
> > > -diagnostics ant gives me java.home as per below :
> > >
> > >    java.home : C:\tools\Java\jdk1.6.0_03\jre
> > >
> > > Though JAVA_HOME set as environment variable in XP and java.home
> > > reported by ant is different, this is a bug ?
> > >
> > > Similiar bug on
> > > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6271061  suggest to
> > > copy javac.exe and tools.jar under C:\tools\Java\jdk1.6.0_03\jre but
> > > not of any help.
> > >
> > > Error stacktrace :
> > >
> > > D:\programs\Regression-Tests.xml:30: Error running
> > > C:\tools\Java\jdk1.6.0_03\bin\javac.exe compiler
> > >  at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(
> > > ProjectHelper.java:508)
> > >  at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:418)
> > >  at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java
> :105)
> > >  at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java
> :288)
> > >  at sun.reflect.GeneratedMethodAccessor144.invoke(Unknown Source)
> > >  at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > DelegatingMethodAccessorImpl.java:25)
> > >  at java.lang.reflect.Method.invoke(Method.java:597)
> > >  at org.apache.tools.ant.dispatch.DispatchUtils.execute(
> DispatchUtils.java
> > > :106)
> > >  at org.apache.tools.ant.Task.perform(Task.java:348)
> > >  at org.apache.tools.ant.Target.execute(Target.java:357)
> > >  at org.apache.tools.ant.Target.performTasks(Target.java:385)
> > >  at org.apache.tools.ant.Project.executeSortedTargets(Project.java
> :1337)
> > >  at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
> > >  at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(
> > > DefaultExecutor.java:41)
> > >  at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
> > >  at org.apache.tools.ant.Main.runBuild(Main.java:758)
> > >  at org.apache.tools.ant.Main.startAnt(Main.java:217)
> > >  at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> > >  at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> > >
> > > Does somebody know what is reason for this ?
> > >
> > > Regards
> > > Ravi.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > A.K.A - FREEMAN FIREFOX
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
A.K.A - FREEMAN FIREFOX

Reply via email to