tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject RE: Compilation Error when building Tomcat
Date Fri, 26 Oct 2001 15:46:22 GMT
On Thu, 25 Oct 2001, Nitin Vira wrote:

> Date: Thu, 25 Oct 2001 18:48:15 -0700
> From: Nitin Vira <nvira@juniper.net>
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> Subject: RE: Compilation Error when building Tomcat
>
> Hi Craig,
>
> Thanks for your help. I have managed to successfully build the tomcat.
> The problems were caused by existence of earlier versions of ant.jar
> and servlet.jar in jre/lib/ext folder. Now I am actually wondering, is
> it really smart to put jars in jre/lib/ext folder cause i struggled
> through a simple build process for 2 days just because of that.
>

The important thing to remember about anything you install in jre/lib/ext
is that you *cannot* override it.  That's OK for a class library that is
stable and commonly required, but not a good idea for a tool like Ant.
Many others have been bit by having an old version of servlet.jar there.

In my personal development environment, I put *nothing* in jre/lib/ext
(and also nothing on my CLASSPATH).  The $ANT_HOME/bin directory is on my
PATH, and I just let Ant assemble classpaths for me as needed, under the
control of build.properties files (as you see in the Tomcat build
process).  This lets me set up global properties in my user home
directory, but override them on a per-project basis as needed.

Once I started doing everything this way, I've never had problems with
classpaths or unintended imports of system extensions.  I heartily
recommend this approach to any Java developer.

> Regards,
> Nitin
>

Craig


Mime
View raw message