Reputation: 4225
I am compiling proto file using command line mention below.
protoc -I ./ --python_out=. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_python_plugin` ./test.proto
Above command i am issuing is to generate python based code and it works fine.
Now same command i tried to issue for Java based code but getting errors.
protoc -I ./ --java_out=. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_java_plugin` ./test.proto
I looked at my plugin directory and found that following plug-ins are installed but not the Java one.
grpc_csharp_plugin
grpc_cpp_plugin
grpc_objective_c_plugin
grpc_node_plugin
grpc_python_plugin
grpc_ruby_plugin
How can i found the Java Plugin?
Upvotes: 0
Views: 321
Reputation: 6628
The plugin is hosted on Maven Central: http://repo1.maven.org/maven2/io/grpc/protoc-gen-grpc-java/
While there isn't a protobuf plugin for Java (it is built into protoc), there is a plugin for the gRPC generated Stubs. Normally this is provided for you by default as a Gradle plugin, but you can manually download and use the plugin. Currently, there are Linux, OSX and Windows builds.
Upvotes: 1