Get build working on jre6,7,8