Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Ant build in Tomcat

 
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HiAll,
I installed tomcat 3.2.1 & now I am trying to configure how to build my source using ANT.. I followed the instructions in tomcats source organization doc. Accordingly I have a build.bat in my source root directory but when I run that I get an error..The build.bat file has the following in it:
@echo on
rem build.bat -- Build Script for the "Hello, World" Application
rem $Id: source.html,v 1.2.4.2 2000/11/27 22:45:49 craigmcc Exp $
set _CP=%CP%
rem Identify the custom class path components we need
set CP=%TOMCAT_HOME%\lib\ant.jar;%TOMCAT_HOME%\lib\servlet.jar
set CP=%TOMCAT_HOME%\lib\jaxp.jar;%TOMCAT_HOME%\lib\parser.jar
set CP=%CP%;%JAVA_HOME%\lib\tools.jar
rem Execute ANT to perform the requird build target
java -classpath %CP%;%CLASSPATH% org.apache.tools.ant.Main -Dtomcat.home=%TOMCAT_HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9
set CP=%_CP%
set _CP=
//end of file
[Note: My TOMCAT_HOME & JAVA_HOME variables are set]
The error I am getting is as follows:

c:\jakarta-tomcat-3.2.1\MyProject>java -classpath \lib\jaxp.jar;\lib\parser.jar;C:\Java\jdk1.3\lib\tools.jar;c:\j2sdkee
1.2.1\lib\j2ee.jar;c:\multipart\lib\cos.jar org.apache.tools.ant.Main -Dtomcat.home=
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main
I would appreciate any help in this matter.
Thanks,
Roopa
 
Roopa Bagur
Ranch Hand
Posts: 267
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok guys I finally fixed it.

Originally posted by Roopa Bagur:
HiAll,
I installed tomcat 3.2.1 & now I am trying to configure how to build my source using ANT.. I followed the instructions in tomcats source organization doc. Accordingly I have a build.bat in my source root directory but when I run that I get an error..The build.bat file has the following in it:
@echo on
rem build.bat -- Build Script for the "Hello, World" Application
rem $Id: source.html,v 1.2.4.2 2000/11/27 22:45:49 craigmcc Exp $
set _CP=%CP%
rem Identify the custom class path components we need
set CP=%TOMCAT_HOME%\lib\ant.jar;%TOMCAT_HOME%\lib\servlet.jar
set CP=%TOMCAT_HOME%\lib\jaxp.jar;%TOMCAT_HOME%\lib\parser.jar
set CP=%CP%;%JAVA_HOME%\lib\tools.jar
rem Execute ANT to perform the requird build target
java -classpath %CP%;%CLASSPATH% org.apache.tools.ant.Main -Dtomcat.home=%TOMCAT_HOME% %1 %2 %3 %4 %5 %6 %7 %8 %9
set CP=%_CP%
set _CP=
//end of file
[Note: My TOMCAT_HOME & JAVA_HOME variables are set]
The error I am getting is as follows:

c:\jakarta-tomcat-3.2.1\MyProject>java -classpath \lib\jaxp.jar;\lib\parser.jar;C:\Java\jdk1.3\lib\tools.jar;c:\j2sdkee
1.2.1\lib\j2ee.jar;c:\multipart\lib\cos.jar org.apache.tools.ant.Main -Dtomcat.home=
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/Main
I would appreciate any help in this matter.
Thanks,
Roopa


 
What are you doing? You are supposed to be reading this tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!