`
luyuwww
  • 浏览: 95045 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

protobuf 2.5.0 编译jar

 
阅读更多

    本机是windows环境

1. 下载 protobuf最新版本:https://code.google.com/p/protobuf/downloads/detail?name=protobuf-2.5.0.tar.gz

2. 解压后发现没有包.java下面只有一个POM.xml. 用maven吧.(mvn3的环境自己上网找吧)

3. cmd进入protobuf-2.5.0\java\ 运行 mvn package

    发现错误:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (generate-test-sources) on project protobuf-java: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "..\src\protoc": CreateProcess error=2, ????????? -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] 

 看看到IOExcption,缺少文件呀,上网找找资料,原来是缺少protoc.exe

4. copy文件protoc.exe 到protobuf-2.5.0\src\ 再次执行 mvn package

5. protobuf-2.5.0\java\target\protobuf-java-2.5.0.jar

 

如果你不想编译,请看附件

done

分享到:
评论
2 楼 284772894 2013-05-07  
下载了哈哈
1 楼 dragonG 2013-04-22  
不错~ 学习学习!

相关推荐

Global site tag (gtag.js) - Google Analytics