Possible interaction between `brew doctor` and Java I was doing some cleaning earlier with brew doctor and deleted a file from /usr/local/lib with a .dylib extension. Now, whenever I log into a new shell, I get this error:

Error: Could not find or load main class global

Googling points toward this being a Java error, but only when trying to run a Java program - never when simply logging into a shell. I've reinstalled Java, but to no avail.

What could be the source of this error?
You deleted a file from your /usr/local, which is referenced by programs that are installed with brew. You'll most likely have to go through the reinstallation process to get that .dylib back if you can't find it and replace it on your own.