aleksandar aleksandar - 1 month ago 9x
Java Question

eclipse cannot find class in jar for google api client

I have a project that uses google calendar. I built the original code in a separate project that used maven.

This is the maven artifact:


Works just fine.

I then import the code into another project that doesn't use maven.
I go to the maven website and download THIS SAME JAR.
I go to
Project -> Properties -> Build Path -> Add External Jars
and add this jar.

I go
Project -> Clean
and build the project.

The result? Classes such as:


I know they are in the jar because I just used it with maven!

Any help on this?


You have this problem because google-api-client requires

Google HTTP Client Library for Java

Google OAuth Client Library for Java

You did not face this problem in maven as maven downloaded them for you internally. Maven resolves transitive dependencies ie (dependencies that are required for your jar) internally. You did not see that coming.

You can download both from here :



Have a look at maven's dependency resolution mechanism here

Have a look here to get idea of the required dependencies for your current api to work: