Thursday, 15 April 2010

java - problems building the protobuf example apps -



java - problems building the protobuf example apps -

i'm new protobufs , trying larn more using them. i've downloaded protobuf packaged here. there readme.txt file within examples folder of archive gives instructions on how build 2 illustration applications. when follow instructions building java application:

make java

i lot of errors followed by:

100 errors make: * [javac_middleman] error 1

all of 100 errors seem classpath related, typical example:

com/example/tutorial/addressbookprotos.java:37: error: bundle com.google.protobuf not exist

any ideas how passed this?

the problem reason protobuf jar not added classpath during compilation. prepare should open examples/makefile , add together -cp protobuf-java-2.4.1.jar @ end of java complilation line javac addperson.java listpeople.java com/example/tutorial/addressbookprotos.java.

p.s. if built protobufs maven jar located @ ~/.m2/repository/com/google/protobuf/protobuf-java/2.4.1/protobuf-java-2.4.1.jar (version of jar might different)

java protocol-buffers

No comments:

Post a Comment