Also learn Weibo Development (2) use external jar for online login verification

Source: Internet
Author: User

Preface

 

After analyzing the login module of the Weibo case, I tried to follow up the myweibo project on the welcome page last time. HoweverCodeThere are still some import classes that are always unable to be found. I looked at the location, which is part of the API package provided by sina. Due to the large number of files, I tried to delete some irrelevant files at the beginning, errors are reduced. Finally, the classes in the external jar files are referenced, so I cannot find out how to use these jar files for a long time.

 

Solve the problem

 

The root cause of the problem is to import an external jarProgramCall (Figure 4 shows the error location of the corresponding code). If you are familiar with Eclipse, you should be able to solve the problem quickly. It is the first time you have encountered the problem of introducing an external JAR file. Here we will write down the solution steps, and some people may encounter this problem like me.

1. Copy the JAR file to the lib directory;

2. Find the referenced libraries directory in the project. I use the latest eclipse indigo J2EE version. This directory is not available by default. This problem is mainly caused by the fact that eclipse hides the empty referenced libraries directory by default, we need to add it on our own. Click the inverted triangle in the upper right corner = "filters =" to deselect the check box for empty library containers and empty packages. For details, see:

 

3. Now you can go to the referenced libraries directory, right-click build Path =, and then click Configure build path ..., Click Add jars in the pop-up menu to add the jar files in the lib directory one by one.

 

 

Now, the error disappears.

The problem of referencing external jar is solved, but it is impossible to log on when deployed to the simulator, and the real location of the logon progress bar is always in progress. Therefore, the revolution has not yet succeeded. comrades still need to work hard, when the test is OK, complete the code analysis ...... To be continued .....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.