sp00m
sp00m

Reputation: 48807

Dependency between two Eclipse projects: how to add one's classpath into second's?

I'm working on two projects A and B:

A and B both are Eclipse projects. To make B able to use A's classes without having to re-package A each time, I right-clicked on B in Eclipse > Properties > Deployment Assembly > Add > Project > A.

B thus compiles, but on runtime, when I call a class of A that uses Guava, I get a java.lang.NoClassDefFoundError caused by a java.lang.ClassNotFoundException, since B doesn't have Guava into its classpath (even though he has A).

Any idea how to proceed?

Upvotes: 0

Views: 358

Answers (1)

Sergey Morozov
Sergey Morozov

Reputation: 4608

You should add guava-library in the deployment assembly. =)

Upvotes: 1

Related Questions