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]

Reply via email to