junit as external jar or library

what is difference bewteen adding junit as external jar or as Libray as attached.

I got error initally saying Error: Could not find or load main class
when i run as juni tclass.

when i added Library then junit 4(earlier it was only added as external jar) i was able to run the test case.

Please advise.
jarsJunit.png
LVL 7
gudii9Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
when i run as juni tclass.
Are you saying that you're trying to run JUnit as an app? If so, that's not what you're meant to do
0
gudii9Author Commented:
In eclipse i was right clicking on the junit class say xyzrtest.java then run as JUnit TEst class then getting error
0
CEHJCommented:
0
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

gudii9Author Commented:
run time errOR I am getting is
Error: Could not find or load main class
when i run as junit class by right clicking on that junit class in eclipse.
0
CEHJCommented:
sounds like the app doesn't have the main class set in its configuration in eclipse
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gudii9Author Commented:
as it is junit no need of junit right. but it got resolved when i added JUnit Library later(initially i added junit as external library as in screenshot in original question which did not resolve the issue though). my question is difference between adding as Library and adding as external jar?
0
gudii9Author Commented:
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JUnit

From novice to tech pro — start learning today.