-1

I have a web project and I am writing a support Java project (will generate runnable jar out of it) which will do some post processing for my web project.

I need to access some classes and functions from web project (which I don't want to re-write in supporting project).

How can I import these classes into my supporting project as web application generate .war files not .jar?

Mike Laren
  • 8,028
  • 17
  • 51
  • 70
Anwar Shaikh
  • 1,591
  • 3
  • 22
  • 43
  • How you build your war? War contains jars, so somewhere in a middle of building process you have them. – talex Jun 22 '15 at 15:24

1 Answers1

1

If you are using eclipse IDE then you can add the required web project to your java project build setup. Just go to the properties of the java project and there go to "Java Build Path". In "Projects" tab add your web project. In "Source" tab add your web project src folder.

This way you can get the required classes from your web project in your java project.

Pradeep S
  • 165
  • 2
  • 10