jenv is a nice app, but its bootstrap is slow. I dislike initializing it every terminal I open.
I created this zsh function to initialize it only if you enter a directory of a java project.
It is evaluated before the prompt using precmd
function.