[ junit ] command line compilation on windows


javac -cp .;C:\Users\dsin\.m2\repository
\junit\junit\4.12\junit-4.12.jar WhateverWillBe.java ContainerJunit.java

NOTE : To keep it simple, remove package declaraction and import in WhateverWillBe and WhatEverWillBeJunit.


java -cp .;C:\Users\dsin\.m2\repository\junit\junit\4.12\junit-4.12.jar;C:\Users\dsin\.m2\repository\org\hamcrest\hamcrest-core\1.1\hamcrest-core-1.1.jar org.junit.runner.JUnitCore ContainerJunit

NOTE : Need hamcrest jar file, since it is not bundle in the junit.jar.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s