Finally able to solve the problem. Yes, ant 1.6.5 can not work with JDK 
1.6 as far  as javascript ant task is concerned. This is because ant 1.6.5 
supports <script> task in a Apache BSF supported language only(refer 
apache ant 1.6.5 manual) whereas later versions i.e. from ant 1.7, 
<script> task can be executed either with Apache BSF or JSR 223 manager 
that is included in JDK 6 or higher (refer apache ant 1.7.0 manual) and 
this can be controlled by "manager" attribute in <script> task. The JSR 
223 scripting manager is indicated by "javax". For details refer "
http://ant.apache.org/manual/Tasks/script.html";.

One more reason that ant 1.6.5 can not work with JDK 6 is since this 
version of ant needs BSF engine and in turn needs Mozilla rhino component 
of version 1.5R3 only. This is the only version of rhino that contains "
org.mozilla.javascript.Context.getDebuggableEngine()" API needed by BSF 
engine. Later versions of rhino don't have this API and ant <script> task 
will fail. JDK 6 contains rhino 1.6R2 which doesn't contain this API and 
hence ant 1.6.5 <script> task will fail if you use BSF engine + JDK6.

Thanks for the help.

Regards
Mangesh Moghe
Tata Consultancy Services
9th to 13th Floors, Kensington, Wing B,
Hiranandani Builders SEZ,Hiranandani Business Park,Powai,
Mumbai - 400 076,Maharashtra
India
Ph:- +91 22 67324874
Mailto: mangesh.mo...@tcs.com
Website: http://www.tcs.com
____________________________________________
Experience certainty.   IT Services
                        Business Solutions
                        Outsourcing
____________________________________________



From:
"Ludwig, Michael" <michael.lud...@delphi-mb.de>
To:
"Ant Users List" <user@ant.apache.org>
Date:
11/16/2010 06:01 PM
Subject:
RE: Executing javascript ant task with jdk 1.6



> > Detected OS: HP-UX
> > Adding reference: ant.ComponentHelper
> > Setting ro project property: ant.version -> Apache Ant version 1.6.5
> > compiled on June 2 2005
> 
> There was no 1.6 back then. But 1.6.5 is the latest 1.6.

Okay, this is not clear. So:

There was no JDK 1.6 back then. But
Ant 1.6.5 is the latest 1.6 Ant relase.

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org



=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


Reply via email to