Better java version initialisation