How To Compile A JUnit Test Class

  • 20 Jan, 2012

    Compiling a JUnit test class is like compiling any other Java classes. The only thing you need watch out is that the JUnit JAR file must be included in the classpath. For example, to compile the test class described previously, you should do this:javac -cp junit-4.4.jar HelloTest.javadir HelloTest.* 453 HelloTest.class 183 HelloTest.javaThe compilation is ok, if you see the HelloTest.class file.

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 All rights reserved.