You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "healey, alex" <al...@Midas-Kapiti.com> on 2001/06/08 14:56:50 UTC

RE: Ant Won't Compile Java Programs

I just had this problem. Just put tools.jar from the JDK into the
classpath to launch Ant.

Alex Healey

>  -----Original Message-----
> From: 	Jim Urban [mailto:jim.urban@netsteps.net] 
> Sent:	Friday, June 08, 2001 2:09 PM
> To:	ant-user@jakarta.apache.org
> Subject:	Ant Won't Compile Java Programs
> 
> I just installed ant on my NT 4.0 PC.  I created a simple "build.xml"
> file for one of my Java projects.  When I run ant it gives me the
> following messages:
> 
> compile:
>     [javac] Modern compiler is not available - using classic compiler
>     [javac] Compiling 192 source files to D:\vcoj\build
> 
> BUILD FAILED
> 
> D:\vcoj\build.xml:17: Cannot use classic compiler, as it is not
> available A common solution is to set the environment variable
> JAVA_HOME to your jdk directory.
> 
> I have my JAVA_HOME set to "d:\jdk1.3".  I can type
> "JAVA_HOME\bin\javac" at the command prompt within my project
> directory and the Java compiler runs just fine.  I can also simply
> type "javac" at the command prompt and run the compiler.  What is
> ant's problem?  Why does it think my compiler is not available?  
> 
> Jim Urban
> Project Manager
> Netsteps Inc.
> Suite 505E
> 1 Pierce Pl.
> Itasca, IL  60143
> Voice:  (630) 250-3045 x2164
> Fax:  (630) 250-3046
> 

RE: Ant Won't Compile Java Programs

Posted by Jim Urban <ji...@netsteps.net>.
I added d:\jdk1.3\lib\tools.jar to my CLASSPATH and I still get the same
error.

Jim Urban

-----Original Message-----
From: healey, alex [mailto:alexh@Midas-Kapiti.com]
Sent: Friday, June 08, 2001 7:57 AM
To: ant-user@jakarta.apache.org
Subject: RE: Ant Won't Compile Java Programs


I just had this problem. Just put tools.jar from the JDK into the
classpath to launch Ant.

Alex Healey

>  -----Original Message-----
> From: 	Jim Urban [mailto:jim.urban@netsteps.net]
> Sent:	Friday, June 08, 2001 2:09 PM
> To:	ant-user@jakarta.apache.org
> Subject:	Ant Won't Compile Java Programs
>
> I just installed ant on my NT 4.0 PC.  I created a simple "build.xml"
> file for one of my Java projects.  When I run ant it gives me the
> following messages:
>
> compile:
>     [javac] Modern compiler is not available - using classic compiler
>     [javac] Compiling 192 source files to D:\vcoj\build
>
> BUILD FAILED
>
> D:\vcoj\build.xml:17: Cannot use classic compiler, as it is not
> available A common solution is to set the environment variable
> JAVA_HOME to your jdk directory.
>
> I have my JAVA_HOME set to "d:\jdk1.3".  I can type
> "JAVA_HOME\bin\javac" at the command prompt within my project
> directory and the Java compiler runs just fine.  I can also simply
> type "javac" at the command prompt and run the compiler.  What is
> ant's problem?  Why does it think my compiler is not available?
>
> Jim Urban
> Project Manager
> Netsteps Inc.
> Suite 505E
> 1 Pierce Pl.
> Itasca, IL  60143
> Voice:  (630) 250-3045 x2164
> Fax:  (630) 250-3046
>


Re: Ant Won't Compile Java Programs

Posted by Christopher William Turner <cw...@cycom.co.uk>.
Tips:
jdk1.4 does *not* ship with a classic compiler anymore.
I *deleted* this line to make it work.
<property name="build.compiler" value="classic"/>  

jdk1.4 on mswindows installs a red-herring jre in $JAVA_HOME/jre
The real one is under "Program Files/JavaSoft".

This list is too busy for me so, thanks for solving
my problems and goodbye ...

-- 
Christopher William Turner, http://www.cycom.co.uk/ "Serving fine Java
since 1996"



RE: Ant Won't Compile Java Programs

Posted by Diane Holt <ho...@yahoo.com>.
--- "healey, alex" <al...@Midas-Kapiti.com> wrote:
> I just had this problem. Just put tools.jar from the JDK into the
> classpath to launch Ant.

Actually, you shouldn't need to. I run Ant on my NT without any CLASSPATH
set in my environment.  I suspect Jim's problem might have to do with the
weird stuff that happens when you use the (stoopid) installer for JDK1.3.
When I used that, nothing wanted to work right -- so I got rid of all of
that (still not sure what all it did -- just know it wasn't good) and just
got the JDK files from a friend who put them into a jar for me, expanded
that into where I wanted them, and everything worked like a champ.

Diane

> >  -----Original Message-----
> > From: 	Jim Urban [mailto:jim.urban@netsteps.net] 
> > Sent:	Friday, June 08, 2001 2:09 PM
> > To:	ant-user@jakarta.apache.org
> > Subject:	Ant Won't Compile Java Programs
> > 
> > I just installed ant on my NT 4.0 PC.  I created a simple "build.xml"
> > file for one of my Java projects.  When I run ant it gives me the
> > following messages:
> > 
> > compile:
> >     [javac] Modern compiler is not available - using classic compiler
> >     [javac] Compiling 192 source files to D:\vcoj\build
> > 
> > BUILD FAILED
> > 
> > D:\vcoj\build.xml:17: Cannot use classic compiler, as it is not
> > available A common solution is to set the environment variable
> > JAVA_HOME to your jdk directory.
> > 
> > I have my JAVA_HOME set to "d:\jdk1.3".  I can type
> > "JAVA_HOME\bin\javac" at the command prompt within my project
> > directory and the Java compiler runs just fine.  I can also simply
> > type "javac" at the command prompt and run the compiler.  What is
> > ant's problem?  Why does it think my compiler is not available?  
> > 
> > Jim Urban
> > Project Manager
> > Netsteps Inc.
> > Suite 505E
> > 1 Pierce Pl.
> > Itasca, IL  60143
> > Voice:  (630) 250-3045 x2164
> > Fax:  (630) 250-3046
> > 


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/