support for multiple java versions. to be improved.