adding new usage menu, refactored to make some common things re-usable amongst java versions