reading java_home from a variable and fixes few puppet scripts' issues