Wednesday, July 09, 2008

Eclipse, Exporting WAR files, and JARs

I have a common project that contains JAR files. To add these jar files to a new project, I had to do the following:
  1. Right click on the new project, select properties, and Java Build Path
  2. Click the Libraries tab and use the "Add Jar" button to add the JARs to the project - this removes NoClassDefFound errors
  3. Click the Export tab, and check each new jar file
  4. Select J2EE module dependencies in the left hand pane, and check each new jar file - this includes the jars when the project is exported
  5. Hit OK
  6. Right click on the project, export, and choose WAR file

No comments:

Labels

Blog Archive

Contributors