parent-dirs of java.prefix might not exist

equivalent of mkdir -p