I think this protoc not compiled with javanano support.
Precompiled windows of version 2.5.0 do not include nano support, see the source code in the path " src\google\protobuf\compiler ", including the java generator, but not the javanano generator. The latest source code in google repositories includes javanano.
You can download the latest source code and try to compile it using MinGW and msys or CygWin , see this post. How to create google protocol buffers in Windows for mingw?
(later I will give details for the construction process)
UPDATE:
Final command line after building protoc.exe
For one proto file
protoc --javanano_out=store_unknown_fields=true:target/generated-sources personal.proto, target/generated-sources
For several proto files
protoc --javanano_out=store_unknown_fields=true:target/generated-sources --proto_path=inputpath input/*.proto
The EDIT Nano generator replaces enumeration members with public static final int fields. This is a problem if the class has an optional enumeration member because this member will be compiled with a primitive int value and will take a default value of zero, which will be the first element of the enumeration. To distinguish cases when the enumeration value has not been set, you can use the optional_field_style parameter, which will generate java.lang.Integer instead of the primitive int. When the protocol is analyzed, the caller can check if the value is null before using the value. Null means the value has not been set.
The above script call could become:
protoc --javanano_out=store_unknown_fields=true,optional_field_style=reftypes:target/generated-sources --proto_path=input input/*.proto
source share