[#COOK-2793] Improved Windows support for Java Cookbook

Improved support for Windows (see COOK-2793)