Hello All
I have verified that tools.jar is in the classpath by <echo>'ing out
${java.class.path}. and it is showing correct directory structure for the
JDK installation. I also tried setting "build.compiler" to "modern" in the
build.xml file.
Doing a java -version I saw that the java what I am using is the same what
is specified in my JAVA_HOME.
I Tried giving the argument -Dbuild.compiler="modern" to command line Ant
but still getting the same problem
=============
Modern compiler is not available - using classic compiler
BUILD FAILED
D:\testing\navTestSite\build.xml:104: Cannot use classic compiler, as it is
not available A common solution is to set the environment variable JAVA_HOME
to your jdk directory. =============
Under HKEY_Local_Machine\Software\Javasoft the value for the
'CurrentVersion' is 1.3. It seems correct to me.
I don't know from where the classic compiler is getting picked up.
If I call ant with -verbose option then the out put is like this
D:\testing\navTestSite>ant -verbose
Ant version 1.3 compiled on May 11 2001
Buildfile: build.xml
Detected Java Version: 1.3
Detected OS: Windows 2000
parsing buildfile D:\testing\navTestSite\build.xml with URI =
file:D:/testing/navTestSite/build.xml
Project base dir set to: D:\testing\navTestSite
Build sequence for target `compile' is [prepare, compile]
Complete build sequence is [prepare, compile, clean, all, dist]
prepare:
[copy] Warning: archive\chart.jar modified in the future.
[copy] archive\chart.jar omitted as
D:\Cockpit-webSite\archive\chart.jar is up to date.
[copy] Warning: HTMLandImages\cockpit12.css modified in the future.
[copy] HTMLandImages\cockpit12.css omitted as
D:\Cockpit-WebSite\HTMLandImages\cockpit12.css is
up to date.
[copy] Warning: HTMLandImages\date-picker.js modified in the future.
[copy] HTMLandImages\date-picker.js omitted as
D:\Cockpit-WebSite\HTMLandImages\date-picker.js
is up to date.
[copy] Warning: HTMLandImages\date-picker.js.bak modified in the
future.
[copy] HTMLandImages\date-picker.js.bak omitted as
D:\Cockpit-WebSite\HTMLandImages\date-picker
.js.bak is up to date.
[copy] Warning: HTMLandImages\default.htm modified in the future.
[copy] HTMLandImages\default.htm omitted as
D:\Cockpit-WebSite\HTMLandImages\default.htm is up
to date.
[copy] Warning: HTMLandImages\Dly.gif modified in the future.
[copy] HTMLandImages\Dly.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\Dly.gif is up to date.
[copy] Warning: HTMLandImages\ge2.gif modified in the future.
[copy] HTMLandImages\ge2.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\ge2.gif is up to date.
[copy] Warning: HTMLandImages\go.gif modified in the future.
[copy] HTMLandImages\go.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\go.gif is up to date.
[copy] Warning: HTMLandImages\green2.gif modified in the future.
[copy] HTMLandImages\green2.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\green2.gif is up to
date.
[copy] Warning: HTMLandImages\last12months.gif modified in the future.
[copy] HTMLandImages\last12months.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\last12months.
gif is up to date.
[copy] Warning: HTMLandImages\Mly.gif modified in the future.
[copy] HTMLandImages\Mly.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\Mly.gif is up to date.
[copy] Warning: HTMLandImages\orange.gif modified in the future.
[copy] HTMLandImages\orange.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\orange.gif is up to
date.
[copy] Warning: HTMLandImages\other.gif modified in the future.
[copy] HTMLandImages\other.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\other.gif is up to d
ate.
[copy] Warning: HTMLandImages\Qly.gif modified in the future.
[copy] HTMLandImages\Qly.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\Qly.gif is up to date.
[copy] Warning: HTMLandImages\red2.gif modified in the future.
[copy] HTMLandImages\red2.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\red2.gif is up to dat
e.
[copy] Warning: HTMLandImages\redhotpage.gif modified in the future.
[copy] HTMLandImages\redhotpage.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\redhotpage.gif
is up to date.
[copy] Warning: HTMLandImages\redline.gif modified in the future.
[copy] HTMLandImages\redline.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\redline.gif is up
to date.
[copy] HTMLandImages\show-calendar.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\show-calenda
r.gif is up to date.
[copy] Warning: HTMLandImages\upload.gif modified in the future.
[copy] HTMLandImages\upload.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\upload.gif is up to
date.
[copy] Warning: HTMLandImages\white.gif modified in the future.
[copy] HTMLandImages\white.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\white.gif is up to d
ate.
[copy] Warning: HTMLandImages\wkly.gif modified in the future.
[copy] HTMLandImages\wkly.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\wkly.gif is up to dat
e.
[copy] Warning: HTMLandImages\Yly.gif modified in the future.
[copy] HTMLandImages\Yly.gif omitted as
D:\Cockpit-WebSite\HTMLandImages\Yly.gif is up to date.
[copy] Warning: XML\adminmetric.xml modified in the future.
[copy] XML\adminmetric.xml omitted as
D:\Cockpit-WebSite\XML\adminmetric.xml is up to date.
[copy] Warning: XML\adminmetrictest.xml modified in the future.
[copy] XML\adminmetrictest.xml omitted as
D:\Cockpit-WebSite\XML\adminmetrictest.xml is up to d
ate.
[copy] Warning: XML\blevelXML.xml modified in the future.
[copy] XML\blevelXML.xml omitted as
D:\Cockpit-WebSite\XML\blevelXML.xml is up to date.
[copy] Warning: XML\levelbsqls.xml modified in the future.
[copy] XML\levelbsqls.xml omitted as
D:\Cockpit-WebSite\XML\levelbsqls.xml is up to date.
[copy] Warning: XML\levelcsqls.xml modified in the future.
[copy] XML\levelcsqls.xml omitted as
D:\Cockpit-WebSite\XML\levelcsqls.xml is up to date.
[copy] Warning: XML\levelcsqlsbak.xml modified in the future.
[copy] XML\levelcsqlsbak.xml omitted as
D:\Cockpit-WebSite\XML\levelcsqlsbak.xml is up to date.
[copy] Warning: XML\mainmenu.xml modified in the future.
[copy] XML\mainmenu.xml omitted as D:\Cockpit-WebSite\XML\mainmenu.xml
is up to date.
[copy] Warning: XML\rcaDetails.xml modified in the future.
[copy] XML\rcaDetails.xml omitted as
D:\Cockpit-WebSite\XML\rcaDetails.xml is up to date.
[copy] Warning: XML\rcaTest.xml modified in the future.
[copy] XML\rcaTest.xml omitted as D:\Cockpit-WebSite\XML\rcaTest.xml is
up to date.
[copy] Warning: XML\test.xml modified in the future.
[copy] XML\test.xml omitted as D:\Cockpit-WebSite\XML\test.xml is up to
date.
[copy] Warning: XML\testLevelC.xml modified in the future.
[copy] XML\testLevelC.xml omitted as
D:\Cockpit-WebSite\XML\testLevelC.xml is up to date.
[copy] Warning: XML\tmp0000.xml modified in the future.
[copy] XML\tmp0000.xml omitted as D:\Cockpit-WebSite\XML\tmp0000.xml is
up to date.
[copy] Warning: XML\tmp0001.xml modified in the future.
[copy] XML\tmp0001.xml omitted as D:\Cockpit-WebSite\XML\tmp0001.xml is
up to date.
[copy] Warning: XSLT\AddUser.xsl modified in the future.
[copy] XSLT\AddUser.xsl omitted as D:\Cockpit-WebSite\XSLT\AddUser.xsl
is up to date.
[copy] Warning: XSLT\adminHome.xsl modified in the future.
[copy] XSLT\adminHome.xsl omitted as
D:\Cockpit-WebSite\XSLT\adminHome.xsl is up to date.
[copy] Warning: XSLT\all-templates.xsl modified in the future.
[copy] XSLT\all-templates.xsl omitted as
D:\Cockpit-WebSite\XSLT\all-templates.xsl is up to dat
e.
[copy] XSLT\header-footer.xsl omitted as
D:\Cockpit-WebSite\XSLT\header-footer.xsl is up to dat
e.
[copy] Warning: XSLT\LevelA.xsl modified in the future.
[copy] XSLT\LevelA.xsl omitted as D:\Cockpit-WebSite\XSLT\LevelA.xsl is
up to date.
[copy] Warning: XSLT\LevelB.xsl modified in the future.
[copy] XSLT\LevelB.xsl omitted as D:\Cockpit-WebSite\XSLT\LevelB.xsl is
up to date.
[copy] Warning: XSLT\LevelC.xsl modified in the future.
[copy] XSLT\LevelC.xsl omitted as D:\Cockpit-WebSite\XSLT\LevelC.xsl is
up to date.
[copy] Warning: XSLT\Message.xsl modified in the future.
[copy] XSLT\Message.xsl omitted as D:\Cockpit-WebSite\XSLT\Message.xsl
is up to date.
[copy] Warning: XSLT\MetricDetails.xsl modified in the future.
[copy] XSLT\MetricDetails.xsl omitted as
D:\Cockpit-WebSite\XSLT\MetricDetails.xsl is up to dat
e.
[copy] Warning: XSLT\monthsForURL.xsl modified in the future.
[copy] XSLT\monthsForURL.xsl omitted as
D:\Cockpit-WebSite\XSLT\monthsForURL.xsl is up to date.
[copy] Warning: XSLT\pageHits.xsl modified in the future.
[copy] XSLT\pageHits.xsl omitted as
D:\Cockpit-WebSite\XSLT\pageHits.xsl is up to date.
[copy] Warning: XSLT\RCA.xsl modified in the future.
[copy] XSLT\RCA.xsl omitted as D:\Cockpit-WebSite\XSLT\RCA.xsl is up to
date.
[copy] Warning: XSLT\RcaDetails.xsl modified in the future.
[copy] XSLT\RcaDetails.xsl omitted as
D:\Cockpit-WebSite\XSLT\RcaDetails.xsl is up to date.
[copy] Warning: XSLT\RedHot.xsl modified in the future.
[copy] XSLT\RedHot.xsl omitted as D:\Cockpit-WebSite\XSLT\RedHot.xsl is
up to date.
[copy] Warning: XSLT\upload.xsl modified in the future.
[copy] XSLT\upload.xsl omitted as D:\Cockpit-WebSite\XSLT\upload.xsl is
up to date.
[copy] Warning: XSLT\UserDetails.xsl modified in the future.
[copy] XSLT\UserDetails.xsl omitted as
D:\Cockpit-WebSite\XSLT\UserDetails.xsl is up to date.
[copy] Warning: archive modified in the future.
[copy] archive omitted as D:\Cockpit-WebSite\archive is up to date.
[copy] Warning: ExcelUpload modified in the future.
[copy] ExcelUpload omitted as D:\Cockpit-WebSite\ExcelUpload is up to
date.
[copy] Warning: HTMLandImages modified in the future.
[copy] HTMLandImages omitted as D:\Cockpit-WebSite\HTMLandImages is up
to date.
[copy] Warning: logs modified in the future.
[copy] logs omitted as D:\Cockpit-WebSite\logs is up to date.
[copy] Warning: XML modified in the future.
[copy] XML omitted as D:\Cockpit-WebSite\XML is up to date.
[copy] Warning: XSLT modified in the future.
[copy] XSLT omitted as D:\Cockpit-WebSite\XSLT is up to date.
compile:
[javac] Warning: com\cockpit\database\AdminDB.java modified in the
future.
[javac] com\cockpit\database\AdminDB.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpi
t\database\AdminDB.class doesn't exist.
[javac] Warning: com\cockpit\database\BaseDBHandler.java modified in the
future.
[javac] com\cockpit\database\BaseDBHandler.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\
cockpit\database\BaseDBHandler.class doesn't exist.
[javac] Warning: com\cockpit\database\CLevelDB.java modified in the
future.
[javac] com\cockpit\database\CLevelDB.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockp
it\database\CLevelDB.class doesn't exist.
[javac] Warning: com\cockpit\database\MetricStatusDB.java modified in
the future.
[javac] com\cockpit\database\MetricStatusDB.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com
\cockpit\database\MetricStatusDB.class doesn't exist.
[javac] Warning: com\cockpit\database\RcaDB.java modified in the future.
[javac] com\cockpit\database\RcaDB.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpit\
database\RcaDB.class doesn't exist.
[javac] Warning: com\cockpit\database\UploadDB.java modified in the
future.
[javac] com\cockpit\database\UploadDB.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockp
it\database\UploadDB.class doesn't exist.
[javac] Warning: com\cockpit\util\CpitException.java modified in the
future.
[javac] com\cockpit\util\CpitException.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cock
pit\util\CpitException.class doesn't exist.
[javac] Warning: com\cockpit\util\CpitGeneral.java modified in the
future.
[javac] com\cockpit\util\CpitGeneral.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpi
t\util\CpitGeneral.class doesn't exist.
[javac] Warning: com\cockpit\util\CpitLogManager.java modified in the
future.
[javac] com\cockpit\util\CpitLogManager.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\coc
kpit\util\CpitLogManager.class doesn't exist.
[javac] Warning: com\cockpit\util\Requests.java modified in the future.
[javac] com\cockpit\util\Requests.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpit\u
til\Requests.class doesn't exist.
[javac] Warning: com\cockpit\xml\AdminHomeXML.java modified in the
future.
[javac] com\cockpit\xml\AdminHomeXML.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpi
t\xml\AdminHomeXML.class doesn't exist.
[javac] Warning: com\cockpit\xml\AdminMetricXML.java modified in the
future.
[javac] com\cockpit\xml\AdminMetricXML.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cock
pit\xml\AdminMetricXML.class doesn't exist.
[javac] Warning: com\cockpit\xml\AdminUserXML.java modified in the
future.
[javac] com\cockpit\xml\AdminUserXML.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpi
t\xml\AdminUserXML.class doesn't exist.
[javac] Warning: com\cockpit\xml\BaseXML.java modified in the future.
[javac] com\cockpit\xml\BaseXML.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpit\xml
\BaseXML.class doesn't exist.
[javac] Warning: com\cockpit\xml\HeadFootXML.java modified in the
future.
[javac] com\cockpit\xml\HeadFootXML.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpit
\xml\HeadFootXML.class doesn't exist.
[javac] Warning: com\cockpit\xml\LevelAXML.java modified in the future.
[javac] com\cockpit\xml\LevelAXML.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpit\x
ml\LevelAXML.class doesn't exist.
[javac] Warning: com\cockpit\xml\LevelBXML.java modified in the future.
[javac] com\cockpit\xml\LevelBXML.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpit\x
ml\LevelBXML.class doesn't exist.
[javac] Warning: com\cockpit\xml\LevelCXML.java modified in the future.
[javac] com\cockpit\xml\LevelCXML.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpit\x
ml\LevelCXML.class doesn't exist.
[javac] Warning: com\cockpit\xml\MessageXML.java modified in the future.
[javac] com\cockpit\xml\MessageXML.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpit\
xml\MessageXML.class doesn't exist.
[javac] Warning: com\cockpit\xml\RcaXML.java modified in the future.
[javac] com\cockpit\xml\RcaXML.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpit\xml\
RcaXML.class doesn't exist.
[javac] Warning: com\cockpit\xml\RedHotXML.java modified in the future.
[javac] com\cockpit\xml\RedHotXML.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpit\x
ml\RedHotXML.class doesn't exist.
[javac] Warning: com\cockpit\xml\UploadXML.java modified in the future.
[javac] com\cockpit\xml\UploadXML.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpit\x
ml\UploadXML.class doesn't exist.
[javac] Warning: com\cockpit\xml\UsageXML.java modified in the future.
[javac] com\cockpit\xml\UsageXML.java added as
D:\Cockpit-WebSite\WEB-INF\classes\com\cockpit\xm
l\UsageXML.class doesn't exist.
[javac] Warning: RequestDispatcher.java modified in the future.
[javac] RequestDispatcher.java added as
D:\Cockpit-WebSite\WEB-INF\classes\RequestDispatcher.cla
ss doesn't exist.
[javac] Modern compiler is not available - using classic compiler
[javac] Compiling 24 source files to D:\Cockpit-WebSite\WEB-INF\classes
[javac] Using classic compiler
[javac] Compilation args: -d D:\Cockpit-WebSite\WEB-INF\classes
-classpath D:\Cockpit-WebSite\WE
B-INF\classes;D:\jdk1.3\lib\tools.jar;D:\jakarta-ant-1.5\lib\xml-apis.jar;D:
\jakarta-ant-1.5\lib\xercesImpl.jar;D:\jakarta-ant-1.5\lib\optional.jar;D:\j
akarta-ant-1.5\lib\ant.jar -sourcepath D:\testing\navTestSite\src -g
[javac] Files to be compiled:
D:\testing\navTestSite\src\com\cockpit\database\AdminDB.java
D:\testing\navTestSite\src\com\cockpit\database\BaseDBHandler.java
D:\testing\navTestSite\src\com\cockpit\database\CLevelDB.java
D:\testing\navTestSite\src\com\cockpit\database\MetricStatusDB.java
D:\testing\navTestSite\src\com\cockpit\database\RcaDB.java
D:\testing\navTestSite\src\com\cockpit\database\UploadDB.java
D:\testing\navTestSite\src\com\cockpit\util\CpitException.java
D:\testing\navTestSite\src\com\cockpit\util\CpitGeneral.java
D:\testing\navTestSite\src\com\cockpit\util\CpitLogManager.java
D:\testing\navTestSite\src\com\cockpit\util\Requests.java
D:\testing\navTestSite\src\com\cockpit\xml\AdminHomeXML.java
D:\testing\navTestSite\src\com\cockpit\xml\AdminMetricXML.java
D:\testing\navTestSite\src\com\cockpit\xml\AdminUserXML.java
D:\testing\navTestSite\src\com\cockpit\xml\BaseXML.java
D:\testing\navTestSite\src\com\cockpit\xml\HeadFootXML.java
D:\testing\navTestSite\src\com\cockpit\xml\LevelAXML.java
D:\testing\navTestSite\src\com\cockpit\xml\LevelBXML.java
D:\testing\navTestSite\src\com\cockpit\xml\LevelCXML.java
D:\testing\navTestSite\src\com\cockpit\xml\MessageXML.java
D:\testing\navTestSite\src\com\cockpit\xml\RcaXML.java
D:\testing\navTestSite\src\com\cockpit\xml\RedHotXML.java
D:\testing\navTestSite\src\com\cockpit\xml\UploadXML.java
D:\testing\navTestSite\src\com\cockpit\xml\UsageXML.java
D:\testing\navTestSite\src\RequestDispatcher.java
BUILD FAILED
D:\testing\navTestSite\build.xml:107: Cannot use classic compiler, as it is
not available A common solution is to set the environment variable JAVA_HOME
to your jdk directory.
Total time: 2 seconds
Thanks
Naveen
-----Original Message-----
From: Conor MacNeill [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 20, 2002 11:42 AM
To: Ant Users List
Subject: Re: Ant build problem URGENT!!!!!!
Naveen_JaiDayal wrote:
> Hello All
A couple of things to check.
You said you were using Ant 1.5 but the message you show
"Modern compiler is not available - using classic compiler"
comes from Ant 1.4.1. In Ant 1.5 it would say someting like
"Modern compiler not found - looking for classic compiler"
I'm not sure if the code changes in this area will affect your problem but
it worth being clear about the versions.
You could try running this build.xml file with -debug turned on
<project default="modern">
<target name="modern">
<typedef name="moderntest" classname="com.sun.tools.javac.Main"/>
<moderntest/>
</target>
<target name="classic">
<typedef name="classictest" classname="sun.tools.javac.Main"/>
<classictest/>
</target>
</project>
If you try this with both
ant -debug modern
and
ant -debug classic
it might give us some idea about what is going on. Note that the classic
option will always fail but the error message will change depending on
whether the compiler is truly available.
Also, try clearing any java.exe and javaw.exe you find in WINNT\System32
Conor
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************