• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Setting the classpath to struts jars to compile my actions

 
Ranch Hand
Posts: 156
Android Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying to compile a class in a sample struts application I have deployed on Tomcat5.5.

I am trying to set the classpath to all the jars required for my action class in the lib folder.
The path to the lib foler is c:\Apache Software Foundation\Tomcat 5.5\webapps\Struts2InAction\WEB-INF\lib\

I set the classpath to one of my jars as follows:
set CLASSPATH=.;c:\Apache Software Foundation\Tomcat 5.5\webapps\Struts2InAction\WEB-INF\lib\struts2-core-2.0.11.jar

I tried to compile one of my action class after doing this and the number of errors went down.
There are several jars in the lib folder.

I want to set my classpath to point to all these jars.
There are too many jars. In total there are 42jars.
So do I have to keep appending the entire path to the jar file followed by the jar for 42 times.
e.g.
set CLASSPATH=.;c:\Apache Software Foundation\Tomcat 5.5\webapps\Struts2InAction\WEB-INF\lib\struts2-core-2.0.11.jar;c:\Apache Software Foundation\Tomcat 5.5\webapps\Struts2InAction\WEB-INF\lib\xwork-2.0.4.jar and so on for 42 times.

Is there a simpler way to do this? All the jars are in the same location.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I follow the Tomcat Application Developer's Guide on how to configure and build web apps. That guide uses Ant to do builds. Maven is another popular build tool. Both have tools that greatly simplify common build tasks,such as managing dependencies.
 
reply
    Bookmark Topic Watch Topic
  • New Topic