Automated rollback of commit 08e34e37663ec0fa2e957e44c7e1e0a2afc205ea.
*** Reason for rollback ***
Rolling this back as it was the example BUILD file that was incorrect, not the tutorial itself. Submitted an updated BUILD file in commit 6abf4b9.
*** Original change description ***
the build file and bash example out of synch
comparing to the latest code in the java tutorial repo
Closes #3419.
PiperOrigin-RevId: 162635241
diff --git a/site/docs/tutorial/java.md b/site/docs/tutorial/java.md
index 3a31311..6059ba1 100644
--- a/site/docs/tutorial/java.md
+++ b/site/docs/tutorial/java.md
@@ -88,9 +88,8 @@
```
java_binary(
- name = "my-runner",
+ name = "ProjectRunner",
srcs = glob(["src/main/java/com/example/*.java"]),
- main_class = "com.example.ProjectRunner",
)
```
@@ -112,7 +111,7 @@
and run the following command:
```
-bazel build //:my-runner
+bazel build //:ProjectRunner
```
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
@@ -122,11 +121,11 @@
Bazel produces output similar to the following:
```bash
-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
+ 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
```
Congratulations, you just built your first Bazel target! Bazel places build