Reputation: 97
I am trying to create a java file which will send an email. I created a Google web application projects, configured it (hoping I did it properly) and then followed the Java Quickstart guide.
Though I can't import these classes (guessing that therefore also can't run the file):
com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp
import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver
How can I fix this?
Upvotes: 3
Views: 1182
Reputation: 157
If you are using Maven, then add these two dependency.
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-java6</artifactId>
<version>1.11.0-beta</version>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client-jetty</artifactId>
<version>1.23.0</version>
</dependency>
Upvotes: 3