I am trying to use Google's gRPC tool. I followed the instructions here but when I run my protoc code, I get the following error: compiler/build/binaries/java_pluginExecutable/java_plugin: program not found or is not executable. Any help is appreciated. I'm on OSX 10.9.5 with Gradle 2.3.
2 Answers
Did you get any errors when building the compiler plugin with gradle?
Did you check if the java_plugin is actually there?
Also if you run protoc from within the examples directory, you have to adjust your path to "../compiler/build/binaries/java_pluginExecutable/java_plugin"
Also there is generally no need to run protoc yourself. Simply running ../gradew build from within the examples directory should do everything for you.
1 Comment
dlucci
i did not get any errors. it builds perfectly fine from the example repo and the example server/client.
I fixed my problem. I was not adding a reference to the java_plugin in my gradle file.
2 Comments
Kamran Amini
Would you explain more about the java_plugin reference ?! I'm facing the same problem and grpc_java_plugin file is not generated.
dlucci
I had to look at the sample project that came with grpc. Inside of build.gradle, I saw that there was the line
protobufCodeGenPlugins = ["java_plugin:$rootDir/compiler/build/binaries/java_pluginExecutable/java_plugin"]. That line provides to build script with the java plugin. It fixed my problem and it should fix yours!