• 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

Not so clear on where the jar files go

 
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a large number of jar files in the Struts 2 download. Some of these -- the struts core, the xwork core and a couple of others -- are used by the project I'm trying to compile. I'm a little unclear on where these go:

1. Should I add struts2-core-2.1.8.1.jar and xwork-core-2.1.6.jar and whatever else the compiler needs to the system's lib folder? Is there any reason not to do this?

1a. Is there a better way, one that does not involve putting things in the system classpath? I'm compiling at the command line - no IDE.

2. There is a .classpath file in the project's root, something I have not seen before. Is it correct to say that this .classpath file sets the project's classpath at runtime, and that I should put the jars I actually need under WEB-INF\lib and list them in this file?

2a. What is the relationship between this file and the system classpath when my app runs?
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Should I add struts2-core-2.1.8.1.jar and xwork-core-2.1.6.jar and whatever else the compiler needs to the system's lib folder?

No.

Is there any reason not to do this?

Yes.

1a. Is there a better way, one that does not involve putting things in the system classpath? I'm compiling at the command line - no IDE.

Yes--put them in the web app's WEB-INF/lib directory, where they belong. (Unless you're using Maven, in which case don't, and use Maven to build.)

2. There is a .classpath file in the project's root, something I have not seen before. Is it correct to say that this .classpath file sets the project's classpath at runtime, and that I should put the jars I actually need under WEB-INF\lib and list them in this file?

No. ".classpath" is an Eclipse artifact. Don't edit it manually.

2a. What is the relationship between this file and the system classpath when my app runs?

No relationship whatsoever.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic