aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/docs/tutorial
diff options
context:
space:
mode:
authorGravatar Laszlo Csomor <laszlocsomor@google.com>2018-07-26 07:38:14 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-07-26 07:39:33 -0700
commit7574865cc13cbe73ff8c1e959888d5d4426bb5ff (patch)
treedd205cc97a59316f1b13983dd1adb0d6a52d03ca /site/docs/tutorial
parent46f3524bf391d0d773a94962ccc5a2d023767a0b (diff)
docs: update Windows installation and setup docs
Also update the Java Tutorial page to say you have to install the JDK and set JAVA_HOME. See https://github.com/bazelbuild/bazel/issues/5208 Change-Id: I14b792589c39f03572518aaff6f6f8e5ca8a65c8 Closes #5617. Change-Id: I45c841189b0c220365ab9aeeb67f26b32059be4a PiperOrigin-RevId: 206156529
Diffstat (limited to 'site/docs/tutorial')
-rw-r--r--site/docs/tutorial/java.md19
1 files changed, 18 insertions, 1 deletions
diff --git a/site/docs/tutorial/java.md b/site/docs/tutorial/java.md
index 8352229a6b..b1ed79da86 100644
--- a/site/docs/tutorial/java.md
+++ b/site/docs/tutorial/java.md
@@ -27,6 +27,7 @@ In this tutorial you'll learn how to:
* [Before you begin](#before-you-begin)
* [Install Bazel](#install-bazel)
+ * [Install the JDK](#install-the-jdk)
* [Get the sample project](#get-the-sample-project)
* [Build with Bazel](#build-with-bazel)
* [Set up the workspace](#set-up-the-workspace)
@@ -47,6 +48,23 @@ In this tutorial you'll learn how to:
To prepare for the tutorial, first [Install Bazel](../install.md) if
you don't have it installed already.
+### Install the JDK
+
+1. Install Java 8 JDK.
+
+2. Set the JAVA\_HOME environment variable to point to the JDK.
+ * On Linux/macOS:
+
+ export JAVA_HOME="$(dirname $(dirname $(realpath $(which javac))))"
+ * On Windows:
+ 1. Open Control Panel.
+ 2. Go to "System&nbsp;and&nbsp;Security" &gt; "System" &gt; "Advanced&nbsp;System&nbsp;Settings" &gt; "Advanced"&nbsp;tab &gt; "Environment&nbsp;Variables..." .
+ 3. Under the "User&nbsp;variables" list (the one on the top), click "New...".
+ 4. In the "Variable&nbsp;name" field, enter `JAVA_HOME`.
+ 5. Click "Browse&nbsp;Directory...".
+ 6. Navigate to the JDK directory (for example `C:\Program&nbsp;Files\Java\jdk1.8.0_152`).
+ 7. Click "OK" on all dialog windows.
+
### Get the sample project
Retrieve the sample project from Bazel's GitHub repository:
@@ -60,7 +78,6 @@ directory and is structured as follows:
```
java-tutorial
-│
├── BUILD
├── src
│ └── main