我是新手使用有线协议缓冲区。我有PersonProto.proto文件:
message Person {
required int32 id = 1;
required string name = 2;
optional string email = 3;
}
和wire-compiler-1.6.0-jar-with-dependencies.jar在同一个文件夹中:Desktop \ Newfolder。 我用这个命令来构建:
$java -jar wire-compiler-1.6.0-jar-with-dependencies.jar \ --proto_path=../Newfolder \ --java_out=../Newfolder PersonProto.proto
我有一个例外:
Exception in thread "main" java.io.FileNotFoundException: ..\Newfolder (Access is denied)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at com.squareup.wire.IO$FileIO.parse(IO.java:43)
at com.squareup.wire.WireCompiler.compile(WireCompiler.java:251)
at com.squareup.wire.WireCompiler.main(WireCompiler.java:188)
我曾尝试使用其他文件夹,但我无法成功编译。 请给我一些想法, 提前谢谢!