Build: support building with openjdk and java6

Change-Id: I4359f802722a7563ff9acbbc9f30b8f7499f4609
Merge "Build: support building with openjdk and java6" into kitkat