aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorGravatar Laszlo Csomor <laszlocsomor@google.com>2015-03-30 09:46:52 +0000
committerGravatar Ulf Adams <ulfjack@google.com>2015-03-30 12:20:18 +0000
commit8fc50746f39715e8e77b6f77587ccc4aa4649158 (patch)
treeae67baeb41313e42d699fc1e2c63c751929e7f63 /docs
parentd86399d5b9c51c9ffcc8d58e53e4fd4447082ac1 (diff)
Bazel docs: make installation instructions more detailed.
Specifically, talk more about setting the JAVA_HOME envvar. Fixes GitHub issue #77 (https://github.com/google/bazel/issues/77) -- MOS_MIGRATED_REVID=89849229
Diffstat (limited to 'docs')
-rw-r--r--docs/install.md29
1 files changed, 24 insertions, 5 deletions
diff --git a/docs/install.md b/docs/install.md
index 0574408639..be4bb9c4fc 100644
--- a/docs/install.md
+++ b/docs/install.md
@@ -27,21 +27,40 @@ Java:
To build Bazel on Ubuntu:
1. Install JDK 8:
- * On Ubuntu Trusty (14.04LTS), no OpenJDK 8 is available and the
+ * Ubuntu Trusty (14.04LTS): OpenJDK 8 is not available so the
fastest way is to install the Oracle JDK 8:
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
- * On Ubuntu Utopic (14.10):
+ * Ubuntu Utopic (14.10): you can install OpenJDK 8 like this:
$ sudo apt-get install openjdk-8-jdk
-2. Install required packages:
+2. Set the `JAVA_HOME` environment variable.
+
+ Check if it's already set:
+
+ $ echo $JAVA_HOME
+
+ If this prints the path to the JDK 8 root, you can proceed to the next step.
+
+ Otherwise you'll need to set this to the root of the JDK. Use `which javac`
+ to find the path to the JDK's `bin` directory. Use `javac -version` to verify
+ that you're dealing with the right JDK version.
+
+ For example the path could be `/usr/lib/jvm/jdk1.8.0/bin/javac`. Set the
+ `JAVA_HOME` variable to `/usr/lib/jvm/jdk1.8.0` then, using:
+
+ $ export JAVA_HOME=/usr/lib/jvm/jdk1.8.0
+
+ You can also add this line to your `~/.bashrc` file.
+
+3. Install required packages:
$ sudo apt-get install libarchive-dev pkg-config zip g++ zlib1g-dev
-3. Build Bazel:
+4. Build Bazel:
$ cd bazel
$ ./compile.sh
@@ -55,7 +74,7 @@ Using Bazel on Mac OS X requires:
[Apple's developer site](https://developer.apple.com/xcode/downloads/).
* MacPorts or Homebrew for installing required packages.
* An installation of JDK 8.
-* (optional) For objc\_\* and ios\_\* rule support: An installed copy of
+* (optional) For `objc_*` and `ios_*` rule support: An installed copy of
Xcode 6.1 or later with iOS SDK 8.1.
To build Bazel on Mac OS X: