diff options
author | Shlomi Shemesh <shlomish@wix.com> | 2017-07-20 13:17:14 +0200 |
---|---|---|
committer | Klaus Aehlig <aehlig@google.com> | 2017-07-20 14:48:21 +0200 |
commit | 08e34e37663ec0fa2e957e44c7e1e0a2afc205ea (patch) | |
tree | 466c8c3399d73faa3ff4babfcb551aeec380ef6e /site/docs/tutorial | |
parent | 1711276d95f398a89ac501190f2158bcbb46b4dd (diff) |
the build file and bash example out of synch
comparing to the latest code in the java tutorial repo
Closes #3419.
PiperOrigin-RevId: 162599972
Diffstat (limited to 'site/docs/tutorial')
-rw-r--r-- | site/docs/tutorial/java.md | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/site/docs/tutorial/java.md b/site/docs/tutorial/java.md index 6059ba1123..3a3131111f 100644 --- a/site/docs/tutorial/java.md +++ b/site/docs/tutorial/java.md @@ -88,8 +88,9 @@ Take a look at the `java-tutorial/BUILD` file: ``` java_binary( - name = "ProjectRunner", + name = "my-runner", srcs = glob(["src/main/java/com/example/*.java"]), + main_class = "com.example.ProjectRunner", ) ``` @@ -111,7 +112,7 @@ Let's build your sample project. Change into the `java-tutorial` directory and run the following command: ``` -bazel build //:ProjectRunner +bazel build //:my-runner ``` Notice the target label - the `//` part is the location of our `BUILD` file relative to the root of the workspace (in this case, the root itself), and @@ -121,11 +122,11 @@ learn about target labels in more detail at the end of this tutorial.) Bazel produces output similar to the following: ```bash - INFO: Found 1 target... - Target //:ProjectRunner up-to-date: - bazel-bin/ProjectRunner.jar - bazel-bin/ProjectRunner - INFO: Elapsed time: 1.021s, Critical Path: 0.83s +INFO: Found 1 target... +Target //:my-runner up-to-date: + bazel-bin/my-runner.jar + bazel-bin/my-runner +INFO: Elapsed time: 10.179s, Critical Path: 0.84s ``` Congratulations, you just built your first Bazel target! Bazel places build |