Grep source code for string

Please note that the wildcard needs to be escaped or the shell will expand it for you.

$ grep -r --include=\*.java 'string to search for' ./

via Nelson@StackOverflow