eclipse - Include one project's jar libraries in another project depending on the first -


i working on 2 projects in eclipse.

project depends on jar files come project, , jar files have been added “libraries” tab in project a's “java build path” property in eclipse.

project b depends on project a, directly using classes in of jar files in project a's build path.

i had assumed adding project project b's java build class add jars in project a's build path, appears not case.

do have manually add jars project b's build class, or overlooking setting? if so, why useful standard behaviour?

you have manually add jars project b's classpath.

adding project dependency means project depends on compiled output of project b. project b's output (its compiled .class files) doesn't contain .jar files depends on.

why this? don't know rationale of eclipse authors, guess want keep classpath simple , verbose possible. things can confusing if have multiple versions of same library on classpath.

in vanilla java can provide directory names classpath. when loading class, jvm search these directories in order. eclipse encourages stricter approach each jar specified manually. note can add multiple jars @ once, it's trivial add of project b's jars project a's classpath.


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -