MyEclipse2014 Java class Right-click Run as without JUnit Test

Source: Internet
Author: User

Java beginner, want to try to connect to the local database, according to Baidu experience in the method, the last to perform the test stuck, why? Because the MyEclipse right-click Run as does not have the junit test option!

6.1, test database mysql is a successful connection in the project, running the test class when run as does not have Junit test;

6.2, because the project did not introduce JUnit 's jar Package

After the introduction of the engineering directory should be like this

6.3, adding JUnit jar Packages to the project

project name right →Properties→Java Build Path

6.4Libraries→Add Library Select JUnit, then next

6.5 selected version, then Finish

6.6 Add complete,

Then right-click on the Java class file andRun as to select Junit Test .

Connect my local database successfully

MyEclipse2014 Java class Right-click Run as without JUnit Test

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.