X
X
xtrading2015-06-06 14:08:17
Java
xtrading, 2015-06-06 14:08:17

How to connect protobuf to Java?

There is a simple data structure in the proto file:
package tutorial;
option java_package = "com.example.tutorial";
option java_outer_classname = "mess";
message request {
required float a = 1;
required float b = 2;
required float c = 3;
}
message response {
optional float x = 1;
optional string mess = 2;
} I
connect the proto file to java:
import com.example.tutorial.mess;
and when compiling the Java file throws errors (58 pieces and all of them on ".\com\google\protobuf\Descriptors), here is an example of one of them:
.\com\google\protobuf\Descriptors.java:590: error: cannot fint symbols
public DescriptorProto toProto() { return proto; }
^
symbol: class DescriptorProto
location: class Descriptor
What could be causing this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question