protobuf 2.5.0 编译jar

本机是windows环境 java

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

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

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

    发现错误: ui

Java代码   收藏代码
  1. [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]  
  2. [ERROR]  
  3. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.  
  4. [ERROR] Re-run Maven using the -X switch to enable full debug logging.  
  5. [ERROR] For more information about the errors and possible solutions, please read the following articles:  
  6. [ERROR] [Help 1]   

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

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

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

相关文章
相关标签/搜索