added jdk 8 lambda support

removes ~100 lines of repeated code
forces the use of JDK and JRE 1.8