'How to use Mockito in a simple java project without Maven and Gradle

Can we use the Mockito framework in a simple Java project without maven and Gradle? I saw many youtube videos but all of them use either Maven or Gradle. I do not understand why they do not use it in a simple java project.



Solution 1:[1]

Can we use the Mockito framework in a simple Java project without maven and Gradle? I saw many youtube videos but all of them use either Maven or Gradle. I do not understand why they do not use it in a simple java project.

Yes. People do this every day as this. It's the 'normal' way to use Mockito.

Here is an example project that uses an older version of mockito, but the concept is still the same: https://java2blog.com/mockito-junit/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jonathan S. Fisher