diff options
author | Jayant Kolhe <jkolhe@google.com> | 2015-02-26 06:57:03 -0800 |
---|---|---|
committer | Jayant Kolhe <jkolhe@google.com> | 2015-02-26 06:57:03 -0800 |
commit | 36aa13a9591e87fe2ab254255bcfb4ebbcd87251 (patch) | |
tree | f55d56715d83a0e04ba3b9a9ca9e8fca809fadea | |
parent | 110d35889dc9508200246ccd740524062b6c30f4 (diff) | |
parent | dd3b54d639193cfcc89cc55a1eff9c967c400dfc (diff) |
Merge pull request #108 from LisaFC/master
updated with new example code location and build
-rw-r--r-- | java/README.md | 38 |
1 files changed, 14 insertions, 24 deletions
diff --git a/java/README.md b/java/README.md index 4c5e4c5902..9dbe678633 100644 --- a/java/README.md +++ b/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). |