First pass at making using the java cookbook optional.

First pass at making using the java cookbook optional.

For #84.
I didn't even notice that as I just shoved that code into the if block, but I'll add that and commit it