working rebuild, sync with upstream minus java 8