XWork2 works best with at least JDK 5 (Tiger), but it also ships with a Java 1.4-compatible jar built using RetroTranslator.

To start using XWork2, it is required to have the folloing in the classpath :-

Using command line

Assuing the following structure.

+ classes/
    + xwork2-xxx.jar
    + xwork.xml
    + otherJars.jar
    + myPackage/
      + MyMain.class
// Linux / Unix like environment
 java -cp xwork-xxx.jar:xwork.xml:otherJars.jar myPackage.MyMain

 // Windows
 java -cp xwork-xxx.jar;xwork.xml;ohterJars.jar myPackage.MyMain

Using ant

Assuming the following structure

+ src
   + myPackage
     + MyMain.java
 + lib
   + xwork2-xxx.jar
   + ... jar
 + classes
   + myPackage
     + MyMain.class
 + resources
   + xwork.xml
<procject ... >
  ...
  <path id="classpath">
    <fileset dir="lib">
       <include name="**/*.jar"/>
    </fileset>
    <pathelement location="resources"/>
  </path>
  ....
  <target ...>
     <!-- your target refer to path with id as 'classpath' when necessary -->
  </target>

Using maven2

When using maven2, one might want to have the following dependencies

<pom ...>
 ....
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.0.4</version>
        </dependency>
        <dependency>
           .... other dependencies
        </dependency>
  .....
</pom>

Next: XWork Requirements And Dependencies