samples for jdk 7 and jdk 8