How to include oauth library in Eclipse?
I found some OAuth library for Java: http://code.google.com/p/oauth/. But how am I supposed to include this library in Eclipse for usage? I've got last classic version of Eclipse. I'm a newbie.
Just want to be able to import i.e. all of those:
import net.oauth.client.httpclient4.HttpClient4;
import net.oauth.client.OAuthClient;
import net.oauth.OAuthServiceProvider;
import net.oauth.OAuthConsumer;
import开发者_如何学运维 net.oauth.OAuthAccessor;
import net.oauth.OAuth;
import net.oauth.OAuthMessage;
import net.oauth.OAuthException;
as in example http://oauth.googlecode.com/svn/code/java/example/command-line/src/net/oauth/example/cmdline/OAuthHelper.java
In Eclipse right click on the project you would like to include the library in and click properties.
Click on Java Build Path and then on the Libraries tab.
Click Add External Jar... and navigate to the library you downloaded.
You can now use this in your project!
In a separate project keep all the source files.
Export jar of the project.
Creating a New JAR File
Right click on the project you would like to include the jar created and click properties.
Click on Java Build Path and then on the Libraries tab.
Click Add External Jar and select the jar created.
精彩评论