switch back and forth between java 7 and 8