Lower the requirement to Java 7

Now that we are using the error-prone javac, there is no need
to impose Java 8. However, because some of our tests are targetting
Java 8, developer should still use a JDK 8 to tests.

--
MOS_MIGRATED_REVID=96400914
diff --git a/.travis/jdk7.WORKSPACE b/.travis/jdk7.WORKSPACE
deleted file mode 100644
index e12d5be..0000000
--- a/.travis/jdk7.WORKSPACE
+++ /dev/null
@@ -1,12 +0,0 @@
-maven_jar(
-   name = "java_langtools",
-   group_id = "com.google.errorprone",
-   version = "1.9.0-dev-r2644-1",
-   artifact_id = "javac",
-   sha1 = "85fd71e0fbee22349e8c6101287cb5e75866a7f2",
-)
-
-bind(
-   name = "langtools",
-   actual = "@java_langtools//jar",
-)
diff --git a/scripts/bootstrap/buildenv.sh b/scripts/bootstrap/buildenv.sh
index d59370d..3be93df 100755
--- a/scripts/bootstrap/buildenv.sh
+++ b/scripts/bootstrap/buildenv.sh
@@ -21,7 +21,7 @@
 DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
 WORKSPACE_DIR="$(dirname $(dirname ${DIR}))"
 
-JAVA_VERSION=${JAVA_VERSION:-1.8}
+JAVA_VERSION=${JAVA_VERSION:-1.7}
 BAZELRC=${BAZELRC:-"/dev/null"}
 PLATFORM="$(uname -s | tr 'A-Z' 'a-z')"
 
diff --git a/site/contributing.md b/site/contributing.md
index 39c9c3a..5af0248 100644
--- a/site/contributing.md
+++ b/site/contributing.md
@@ -54,6 +54,8 @@
 
 ## Setting up your coding environment
 
+_Note that some of our tests target Java 8 so you must test using a JDK 8._
+
 For now we have partial support for the Eclipse and IntelliJ IDEs for Java. We
 don't have IDE support for other languages in Bazel right now.
 
diff --git a/site/docs/install.md b/site/docs/install.md
index d5bfb13..d5577cd 100644
--- a/site/docs/install.md
+++ b/site/docs/install.md
@@ -13,7 +13,7 @@
 
 Java:
 
-*   Java JDK 8 or later
+*   Java JDK 7 or later
 
 ## Downloading Bazel
 
@@ -30,21 +30,12 @@
 
 To build Bazel on Ubuntu:
 
-#### 1. Install JDK 8:
+#### 1. Install JDK 7:
 
-**Ubuntu Trusty (14.04 LTS).** OpenJDK 8 is not available on Trusty. To
-install Oracle JDK 8:
+**Ubuntu Utopic (14.10) and Trusty (14.04 LTS).** To install OpenJDK 7:
 
 ```
-$ sudo add-apt-repository ppa:webupd8team/java
-$ sudo apt-get update
-$ sudo apt-get install oracle-java8-installer
-```
-
-**Ubuntu Utopic (14.10).** To install OpenJDK 8:
-
-```
-$ sudo apt-get install openjdk-8-jdk
+$ sudo apt-get install openjdk-7-jdk
 ```
 
 #### 2. Set the `JAVA_HOME` environment variable.
@@ -55,16 +46,16 @@
 $ echo $JAVA_HOME
 ```
 
-If this prints the path to the JDK 8 root directory, proceed to the next
+If this prints the path to the JDK 7 root directory, proceed to the next
 step. Otherwise, find the Java `bin` directory using `which javac` and use
 `javac -version` to verify that you have the right JDK version. Then set
 the `JAVA_HOME` environment variable to the `bin` directory parent.
 
-For example, if the path is `/usr/lib/jvm/jdk1.8.0/bin/javac`, set the
-`JAVA_HOME` variable to `/usr/lib/jvm/jdk1.8.0`:
+For example, if the path is `/usr/lib/jvm/jdk1.7.0/bin/javac`, set the
+`JAVA_HOME` variable to `/usr/lib/jvm/jdk1.7.0`:
 
 ```
-$ export JAVA_HOME=/usr/lib/jvm/jdk1.8.0
+$ export JAVA_HOME=/usr/lib/jvm/jdk1.7.0
 ```
 
 You can also add this line to your `~/.bashrc` file.
@@ -91,7 +82,7 @@
 
 * MacPorts or Homebrew for installing required packages.
 
-* An installation of JDK 8.
+* An installation of JDK 7.
 
 * For `objc_*` and `ios_*` rule support, you must have Xcode 6.1 or later with
   iOS SDK 8.1 installed on your system.
diff --git a/src/BUILD b/src/BUILD
index 6a73011..e5957de 100644
--- a/src/BUILD
+++ b/src/BUILD
@@ -48,7 +48,7 @@
           VERSION_LINE=$$(cat $< | grep target_version);
           JAVA_VERSION=$$(echo $${VERSION_LINE} | sed -E 's/.*value="([^"])".*/\\1/');
           if [ -z "$${JAVA_VERSION}" ]; then
-            echo "1.8" >$@  # Java 8 is the default
+            echo "1.7" >$@  # Java 7 is the default
           elif [[ "$${JAVA_VERSION}" =~ ^[0-9]+$$ ]]; then
             echo "1.$${JAVA_VERSION}" >$@  # Add 1. before 7 or 8
           else
diff --git a/tools/jdk/BUILD b/tools/jdk/BUILD
index d17277b..8c1b257 100644
--- a/tools/jdk/BUILD
+++ b/tools/jdk/BUILD
@@ -73,8 +73,8 @@
 java_toolchain(
     name = "toolchain",
     encoding = "UTF-8",
-    source_version = "8",
-    target_version = "8",
+    source_version = "7",
+    target_version = "7",
 )
 
 exports_files([