use __rvm_setup_compile_environment for jruby, extract requiremnts_osx_java_fail, closes #1810