DI Supporting JDK 6 and 7

This version is modified to run in JDK 6 and 7