开发者

How to include oauth library in Eclipse?

开发者 https://www.devze.com 2023-04-01 12:11 出处:网络
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.

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


  1. In Eclipse right click on the project you would like to include the library in and click properties.

  2. Click on Java Build Path and then on the Libraries tab.

  3. Click Add External Jar... and navigate to the library you downloaded.

  4. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消