Skip to content

Commit

Permalink
Update commands in "Getting Started" so that they actually work.
Browse files Browse the repository at this point in the history
  • Loading branch information
lberki authored and damienmg committed Mar 25, 2015
1 parent c4b74cd commit d408df2
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ examples from the _examples/_ directory.

```bash
$ cd ~/gitroot/base_workspace
$ bazel build examples/java:hello-world
$ bazel build examples/java-native/src/main/java/com/example/myproject:hello-world
Extracting Bazel installation...
...........
INFO: Found 1 target...
Target //examples/java:hello-world up-to-date:
bazel-bin/examples/java/hello-world.jar
bazel-bin/examples/java/hello-world
Target //examples/java-native/src/main/java/com/example/myproject:hello-world up-to-date:
bazel-bin/examples/java-native/src/main/java/com/example/myproject/hello-world.jar
bazel-bin/examples/java-native/src/main/java/com/example/myproject/hello-world
INFO: Elapsed time: 3.040s, Critical Path: 1.14s
$ bazel-bin/examples/java/hello-world
$ bazel-bin/examples/java-native/src/main/java/com/example/myproject/hello-world
Hello world
```

Expand All @@ -74,8 +74,9 @@ for advice on adding build rules for other languages.

Note that when we ran "bazel build" above, the third argument started with a
filesystem path ("examples/java"), followed by a colon. When you run
`bazel build examples/java:hello-world`, Bazel will look for a
special file named BUILD in the _examples/java/_ subdirectory. This
`bazel build examples/java-native/src/main/java/com/example/myproject:hello-world`,
Bazel will look for a special file named BUILD in the
`examples/java-native/src/main/java/com/example/myproject/` subdirectory. This
BUILD file defines rules about how Bazel should build things in this
subdirectory.

Expand Down

0 comments on commit d408df2

Please sign in to comment.