GuruKulki
GuruKulki

Reputation: 26418

what is the difference between projects and libraries in eclipse's build path for any java project

We can add project as well as a jar file in java projects build path in eclipse. so what is the use of it?

Upvotes: 2

Views: 1087

Answers (3)

Michael Borgwardt
Michael Borgwardt

Reputation: 346250

It allows you to have separate projects that depend on each other and are developed in parallel. Any changes you make in one project are instantly visible to other projects that depend on it. If you used JAR files, then when the base project changes you'd first have to build its JAR file, put it into the dependent project's lib folder and rescan the folder.

Upvotes: 3

sleske
sleske

Reputation: 83577

If you add a project, you are adding a number of dependencies, among them is that the classpath of the added project is included into your project.

Adding a jar just adds that jar to the classpath.

Upvotes: 3

Robin
Robin

Reputation: 24262

Projects on the build path allow you to create dependencies between projects in the same workspace as well as use existing libraries via adding jars to the same path.

For example, I may create a project which defines data types that are common between a client and server project. If I am working on all three as separate projects, both will depend on the common data types.

Upvotes: 3

Related Questions