Need help installing JUnit on Mac/How to add JUnit to Path environmental variable on Mac OSX

后端 未结 5 571
花落未央
花落未央 2020-12-30 06:13

I am not able to figure out how to correctly install JUnit onto my mac. I know I am supposed to add it to the path environmental variable, and I have tried a few tutorials I

5条回答
  •  佛祖请我去吃肉
    2020-12-30 06:36

    JUnit doesn't have to be installed. It's a Java library, like all the other libraries, that you can use in your code. The PATH must not be changed to use it. You just need it in the classpath, like all the other Java libraries:

    javac -cp junit.jar ...
    

    to compile, and

    java -cp junit.jar ...
    

    to run.

提交回复
热议问题