Add experimental flag to support OpenJDK builds.

bug: 8992787

(cherry picked from commit d1dbe7f5a23bacdff086b4992e1d31a96da706c3)

Change-Id: Ie977d4f26ae8d3eee9d7b9cf2c0c270bee5b54b3
Signed-off-by: Rob Beane <robbeane@gmail.com>
A few more Java7 related clean ups.

- Separate SDK checking from version checking and
  make messages clearer.
- Add explicit source & target versions for javac to
  make things clearer.
- Rename flag from EXPERIMENTAL_USE_JAVA7_OPENJDK to
  EXPERIMENTAL_USE_JAVA7.
- Allow Oracle JDK 1.7 to be used on Mac OS, since there's
  no official OpenJDK support for that platform.

Change-Id: I454d2c917ed78f03ec7559a99659fefe7e7d50f3
Signed-off-by: Rob Beane <robbeane@gmail.com>
Fix tools path on Mac OS for java 7.

Change-Id: Ieb72b9e10771ee372bacf20258242cb006c29fef
Signed-off-by: Rob Beane <robbeane@gmail.com>
Add "-encoding UTF-8" option to javadoc.

This fixed docs build on Mac OS X 10.9 with Java 7.
Change-Id: I91e224456c9e6c43dbf13d691c3b37d21f94b0f3

Signed-off-by: Rob Beane <robbeane@gmail.com>
Add support for ALTERNATE_JAVAC

Bug: 12476356
Change-Id: Idd013031dc32a560bca76cca295bedcad55982b4
Signed-off-by: Rob Beane <robbeane@gmail.com>
Add missing paren in "java -version" check

Change-Id: Id66e795423e8d25b48ac996956748a93060ea5db
Signed-off-by: Rob Beane <robbeane@gmail.com>
Make envsetup.sh set JAVA_HOME correctly for java7.

Note that despite the location of this change, this function
is run only during "lunch" and not during ". build/envsetup.sh"

Also, make it easier to switch back and forth between java6 and 7
on the same session.

bug: 8992787

Change-Id: I56ec0ba8552b46c04204a8b96b9abc0180f7605f
Signed-off-by: Rob Beane <robbeane@gmail.com>