mirror of https://github.com/grpc/grpc.git
Merge pull request #54 from tbetbetbe/grpc_samples_add_java_quickstart_readme
Adds a quickstart README for java with working instructionspull/3109/head
commit
6608709ce6
1 changed files with 54 additions and 0 deletions
@ -0,0 +1,54 @@ |
||||
gRPC in 3 minutes (Java) |
||||
======================== |
||||
|
||||
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 |
||||
|
||||
INSTALL |
||||
------- |
||||
|
||||
1 Clone the gRPC Java git repo |
||||
```sh |
||||
$ cd <path/to/your/working_dir> |
||||
$ git clone https://github.com/grpc/grpc-java |
||||
``` |
||||
|
||||
2 Install gRPC Java, as described in [How to Build](https://github.com/grpc/grpc-java#how-to-build) |
||||
```sh |
||||
$ # from this dir |
||||
$ 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 |
||||
```sh |
||||
$ # from this directory |
||||
$ ./run_greeter_server.sh & |
||||
``` |
||||
|
||||
- Run the client |
||||
```sh |
||||
$ # from this directory |
||||
$ ./run_greeter_client.sh |
||||
``` |
Loading…
Reference in new issue