Updated to work with Jruby on windows and mac