Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

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
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of gudii9

ASKER

In eclipse i was right clicking on the junit class say xyzrtest.java then run as JUnit TEst class then getting error
Avatar of gudii9

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gudii9

ASKER

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?