| Author |
How to set up JUnit on Mac OS X?
|
Abder-Rahman Ali
Ranch Hand
Joined: May 22, 2008
Posts: 138
|
|
How can I set up JUnit on MAC OS X. When I followed the instructions that I found, I always get:
Exception in thread "main" java.lang.NoClassDefFoundError: org/junit/runner/JUnitCore
How can I do that step by step?
Thanks.
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24061
|
|
|
You don't have to do anything at all to set it up; you just have to include the jar file on the classpath whenever you compile or run your tests. Exactly how to do this depends on how you're working: at the command line, with Ant, in Eclipse, in XCode, in NetBeans... there are many possibilities!
|
[Jess in Action][AskingGoodQuestions]
|
 |
Abder-Rahman Ali
Ranch Hand
Joined: May 22, 2008
Posts: 138
|
|
Ernest Friedman-Hill wrote:You don't have to do anything at all to set it up; you just have to include the jar file on the classpath whenever you compile or run your tests. Exactly how to do this depends on how you're working: at the command line, with Ant, in Eclipse, in XCode, in NetBeans... there are many possibilities!
How can I do it on the command line?
Can you please provide me with instructions since I'm new to MAC OS X?
Thanks.
|
 |
Vince Stone
Greenhorn
Joined: Oct 01, 2011
Posts: 7
|
|
Abder-Rahman Ali wrote:
Ernest Friedman-Hill wrote:You don't have to do anything at all to set it up; you just have to include the jar file on the classpath whenever you compile or run your tests. Exactly how to do this depends on how you're working: at the command line, with Ant, in Eclipse, in XCode, in NetBeans... there are many possibilities!
How can I do it on the command line?
Can you please provide me with instructions since I'm new to MAC OS X?
Thanks.
Did you ever figure out how to do it on the command line/terminal? I am trying to figure this out. Thanks!
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56230
|
|
|
Any tutorial on compiling from the command line will cover this.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26216
|
|
|
Running from the command line requires one extra piece of ingo - the name of tne runner to use. See the Junit faq
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Nikhil Das Nomula
Greenhorn
Joined: Jun 10, 2011
Posts: 23
|
|
I think its been ages since this has been posted. Anyways the issue might be that you need to check your classpath. I think you are using a command like
Instead if you can explicitly specify the classpath as shown below then it solves the NoClassDefFoundError exception.
|
 |
 |
|
|
subject: How to set up JUnit on Mac OS X?
|
|
|