Par exemple avec Git Bash

$ find . -name '*.java' -type f -exec grep -q 'le_mot_FOUND' {} \; '!' -exec grep -q 'le_mot_MISSING' {} \; -print
./src/folder/File2j.ava
./src/folder/File9.java

Ressources

Shell command to find files containing one word but not the second word

This finds files that contain word1:

$ find . -name '*.*' -type f -exec grep -q 'word1' {} \; -print
./file1.txt
./file2.txt

This finds files that contain word1 but not word99:

$ find . -name '*.*' -type f -exec grep -q 'word1' {} \; '!' -exec grep -q 'word99' {} \; -print 
./file1.txt