Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to work with referenced projects in eclipse

Tags:

Ok maybe everybody knows how to do this, but I've never try it beacause I've never needed it so, how do you work with multiple referenced projects in eclipse? I have a couple of Struts 1 web applications that must use another struts 1 "library" project and right now I'm doing the communication between them using url requests, wich is really annoying (at least how I have implemented it).

I would like to be able to use the classes of the "library" project directly in my other struts applications.

So far I know there are supposed to be in the same workspace and that I must reference using the "project references" options in the project properties, but that's it! I really don't know what to do next.

Thanks!


Ok, that did it! Now when I export the struts application in a WAR file what is going to happen to the struts library application? Do I need to export both in separate WAR files or just by exporting the primary applicacion WAR will export also all the files of the library web application?

like image 485
Juan Paredes Avatar asked Jan 14 '09 15:01

Juan Paredes


People also ask

How do I reference a project in Eclipse?

Right-click the file, and then: Click Link artifact to project. A window that lists the projects in the current Eclipse workspace opens. Select the project or folder where you want to place the linked file.

What is reference Eclipse?

The Project References Properties page allows you to set the projects which are referenced by your project. This affects actions such as opening and closing of projects. (i.e. if you close a project and re-open it, you will be prompted to also open the projects which it references.)


1 Answers

Projects Menu -> properties

Go to the Java Build Path.

There, you can either add the library directly or add another project into the build path of the current project.

like image 174
z - Avatar answered Sep 30 '22 19:09

z -