You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2001/05/22 08:15:31 UTC

Re: Yet again!!!! *&^%$#"! "Couldnt find classic compi ler"

Ben,

calm down a little, please - and help me create the missing FAQ entry
with your help.  It usually boils down to one of the reasons you've
already checked.

The compiler detection code tries to load sun.tools.javac.Main, which
is part of classes.zip in Sun's JDK 1.1 and tools.jar in later JDKs.

Ben Hutchison <be...@finetix.com> wrote:

> Yes, my JAVA_HOME is set correctly...

Could you give us some details here, please.  Which OS, what does your
JAVA_HOME point to ...

> Yes, tools.jar is in my classpath...

Not necessary if you start Ant using the ant or ant.bat scripts. As
long as tools.jar is in JAVA_HOME/lib/tools.jar the script will pick
it up automatically.

> Yes, Im using a standard Sun 1.3 distribution...

In which case Ant would first try to use the "modern" compiler
com.sun.tools.javac.Main.  It doesn't seem to find this either.

> No, I dont have ant.jar in my lib/ext/ directory...

fine, and nowhere else in your CLASSPATH, right?

> and finally,
> No, it still not working.

Bad.

Which version of Ant are you using?  

Are you sure that the java executable you invoke (when you type java
on the command line) is the same one as the one in JAVA_HOME/bin?

The "cannot find classic compiler" message will appear if you are
running Kaffee (which you'll find as /usr/bin/java on many Linux
systems) - and I've heard rumors that one can sometimes find a
JAVA.EXE in the Windows system directory (and this one is not related
to the VM you've just installed).

Stefan

How do I specify manifest file in ejbjar?

Posted by Keith Kee <ke...@netsco.com>.
Hi,
  Still a newbie with ant. How does one specify a manifest in the ejbjar
task?

Thanks
keith


IBM JDK 1.3 problem FIXED

Posted by David Goodenough <da...@btconnect.com>.
Well after some help from Stefan Bodewig, I can now report
that the problem has been resolved.  It seems that I had another
version of Ant installed on my machine, and that during the
boostrap process it was using the old version, not the new
one.  How it was doing this is a mistery, as it was not on
the CLASSPATH, but I would suggest that anyone who
has this problem check (and double check) that there
really is no older version of Ant installed anywhere that
the boostrap process might find it.

My old version, just for record, was a copy of 1.0 which
I had installed using RPM.


Re: Yet again!!!! *&^%$#"! "Couldnt find classic compi ler"

Posted by Stefan Bodewig <bo...@apache.org>.
David Goodenough <da...@btconnect.com> wrote:

> I also have ANT_HOME and JAVA_HOME set, and no external CLASSPATH.
> I have seen reports of people who are doing this successfully, but
> none who are building directly from CVS

So you've found the first one.  I'm eating my own dogfood and
therefore always use the latest Ant version.

> (I get this error when doing the boostrap build).

Using the latest CVS of everything, yes?

Let's take this offline for a detailed analysis - your machine and the
development box I'm sitting on seem to be almost identical.

Stefan

Re: Yet again!!!! *&^%$#"! "Couldnt find classic compi ler"

Posted by David Goodenough <da...@btconnect.com>.
Stefan Bodewig wrote:

> David Goodenough <da...@btconnect.com> wrote:
>
> > I think that there is a more deap seated problem, especially with
> > the IBM 1.3 JDK.
>
> I've been running IBM's JDK 1.3 on Linux for many months without ever
> having any problems - it uses the modern compiler.
>
> > The only way I could get the Ant build process to find the modern
> > compiler, was to move tools.jar into jre/lib/ext which should not be
> > necessary.
>
> Right, it shouldn't - and I didn't have to do this.
>
> I have ANT_HOME and JAVA_HOME set and a completely empty CLASSPATH, as
> well as nothing in JAVA_HOME/jre/lib/ext.
>
> > The only difference that I can see, and I have yet to pour over a
> > debug trace, is that Ant has its own class loader.
>
> Ant uses the system classloader when it searches for the compiler,
> this cannot be the reason.
>
> Stefan

I also have ANT_HOME and JAVA_HOME set, and no external CLASSPATH.  I
have seen reports of people who are doing this successfully, but none who
are
building directly from CVS (I get this error when doing the boostrap
build).  All the
people who responded when I asked if there was a problem seemed to be
using
a prebuilt Ant RPM from the end of last year.

I do not think this is IBM JDK level specific, but for the record I have
hit this with
both SR6 and SR7.  I am running on what was, many moons ago, a Redhat 6.2

system, but has been upgraded with 2.2.16 (I will shortly be going
2.2.19) and
a bunch of other upgrades including KDE 2.1.1.

What do you suggest as the best way to track down this problem?

Regards

David

Re: Yet again!!!! *&^%$#"! "Couldnt find classic compi ler"

Posted by Stefan Bodewig <bo...@apache.org>.
David Goodenough <da...@btconnect.com> wrote:

> I think that there is a more deap seated problem, especially with
> the IBM 1.3 JDK.

I've been running IBM's JDK 1.3 on Linux for many months without ever
having any problems - it uses the modern compiler.

> The only way I could get the Ant build process to find the modern
> compiler, was to move tools.jar into jre/lib/ext which should not be
> necessary.

Right, it shouldn't - and I didn't have to do this.

I have ANT_HOME and JAVA_HOME set and a completely empty CLASSPATH, as
well as nothing in JAVA_HOME/jre/lib/ext.

> The only difference that I can see, and I have yet to pour over a
> debug trace, is that Ant has its own class loader.

Ant uses the system classloader when it searches for the compiler,
this cannot be the reason.

Stefan

Re: Yet again!!!! *&^%$#"! "Couldnt find classic compi ler"

Posted by David Goodenough <da...@btconnect.com>.
Stefan Bodewig wrote:

> Ben,
>
> calm down a little, please - and help me create the missing FAQ entry
> with your help.  It usually boils down to one of the reasons you've
> already checked.
>
> The compiler detection code tries to load sun.tools.javac.Main, which
> is part of classes.zip in Sun's JDK 1.1 and tools.jar in later JDKs.
>
> Ben Hutchison <be...@finetix.com> wrote:
>
> > Yes, my JAVA_HOME is set correctly...
>
> Could you give us some details here, please.  Which OS, what does your
> JAVA_HOME point to ...
>
> > Yes, tools.jar is in my classpath...
>
> Not necessary if you start Ant using the ant or ant.bat scripts. As
> long as tools.jar is in JAVA_HOME/lib/tools.jar the script will pick
> it up automatically.
>
> > Yes, Im using a standard Sun 1.3 distribution...
>
> In which case Ant would first try to use the "modern" compiler
> com.sun.tools.javac.Main.  It doesn't seem to find this either.
>
> > No, I dont have ant.jar in my lib/ext/ directory...
>
> fine, and nowhere else in your CLASSPATH, right?
>
> > and finally,
> > No, it still not working.
>
> Bad.
>
> Which version of Ant are you using?
>
> Are you sure that the java executable you invoke (when you type java
> on the command line) is the same one as the one in JAVA_HOME/bin?
>
> The "cannot find classic compiler" message will appear if you are
> running Kaffee (which you'll find as /usr/bin/java on many Linux
> systems) - and I've heard rumors that one can sometimes find a
> JAVA.EXE in the Windows system directory (and this one is not related
> to the VM you've just installed).
>
> Stefan

I think that there is a more deap seated problem, especially with the
IBM 1.3 JDK.  The only way I could get the Ant build process to find
the modern compiler, was to move tools.jar into jre/lib/ext which should
not be necessary.  I was using exactly the same classpath as a test
program which could find the class (and I added an <echo> to test this
in the build script).  The only difference that I can see, and I have yet

to pour over a debug trace, is that Ant has its own class loader.