Xiao Hang 4883e06f15 Merge branch 'master' of https://github.com/grpc/grpc-common %!s(int64=10) %!d(string=hai) anos
..
android df0cb12311 Update README.md %!s(int64=10) %!d(string=hai) anos
src 5aa9eeba54 Removes the unused protos, updates the README to reflect the protos in use %!s(int64=10) %!d(string=hai) anos
README.md e0faf3166b Update README.md %!s(int64=10) %!d(string=hai) anos
javatutorial.md 8813157abe changed gradle command to ./gradlew %!s(int64=10) %!d(string=hai) anos
pom.xml aa7afd63a8 Moves java overview project to a subdirectory %!s(int64=10) %!d(string=hai) anos
run_greeter_client.sh a16a4d551f Complete the change s/Greetings/Greeter %!s(int64=10) %!d(string=hai) anos
run_greeter_server.sh a16a4d551f Complete the change s/Greetings/Greeter %!s(int64=10) %!d(string=hai) anos

README.md

gRPC in 3 minutes (Java)

BACKGROUND

For this sample, we've already generated the server and client stubs from helloworld.proto.

PREREQUISITES

INSTALL

1 Clone the gRPC Java git repo

$ cd <path/to/your/working_dir>
$ git clone https://github.com/grpc/grpc-java

2 Install gRPC Java, as described in How to Build

$ # from this dir
$ cd grpc-java
$ # follow the instructions in 'How to Build'

3 Clone this repo, if you've not already done so.

$ 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

$ # from this directory
$ mvn package

TRY IT!

  • Run the server

    $ # from this directory
    $ ./run_greeter_server.sh &
    
  • Run the client

    $ # from this directory
    $ ./run_greeter_client.sh