updated with new example code location and build

pull/3109/head
Lisa Carey 10 years ago
parent dc82ddbe2c
commit dd3b54d639
  1. 38
      java/README.md

@ -1,17 +1,13 @@
gRPC in 3 minutes (Java)
========================
BACKGROUND
-------------
For this sample, we've already generated the server and client stubs from [helloworld.proto](https://github.com/grpc/grpc-common/blob/master/protos/helloworld.proto).
PREREQUISITES
-------------
- [Java 8](http://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html)
- [Maven 3.2 or later](http://maven.apache.org/download.cgi).
- this is needed to install Netty5, a dependency of gRPC, and to build this sample
- this is needed to install Netty5, a dependency of gRPC
INSTALL
-------
@ -29,30 +25,24 @@ $ cd grpc-java
$ # follow the instructions in 'How to Build'
```
3 Clone this repo, if you've not already done so.
```sh
$ cd <path/to/your/working_dir>
$ git clone https://github.com/grpc/grpc-common
$ cd grpc-common/java # switch to this directory
```
4 Build the samples
```sh
$ # from this directory
$ mvn package
```
TRY IT!
-------
- Run the server
Our [Gradle build file](https://github.com/grpc/grpc-java/blob/master/examples/build.gradle) simplifies building and running the examples.
You can build and run the Hello World server used in [Getting started](https://github.com/grpc/grpc-common) from the `grpc-java` root folder with:
```sh
$ # from this directory
$ ./run_greeter_server.sh &
$ ./gradlew :grpc-examples:helloWorldServer
```
- Run the client
and in another terminal window confirm that it receives a message.
```sh
$ # from this directory
$ ./run_greeter_client.sh
$ ./gradlew :grpc-examples:helloWorldClient
```
TUTORIAL
--------
You can find a more detailed tutorial in [gRPC Basics: Java](https://github.com/grpc/grpc-common/blob/master/java/javatutorial.md).

Loading…
Cancel
Save