Open GoogleCodeExporter opened 8 years ago
It seems to me that everything is OK, but you haven't turn on the right
options. See attached images. You should turn on "Generate java sources during
pre-compile phase". It will generate the code and put it into "Generated
Sources" dir.
One more hint (image 2):
Instead of sending me 'protobuf-java-2.0.3' you can add 'protobuf-2.0' library
to your project.
Please confirm that above steps resolved your problem.
Original comment by p...@google.com
on 8 Aug 2010 at 5:23
Attachments:
I turned on "Generate java sources during pre-compile phase", but that did not
fix it. If I right-click the protobuf test project (the one I sent you) and
select "Clean and Build", I still get an error message because the protobuf
classes are not rebuild:
init:
deps-clean:
Updating property file:
C:\Users\thaler\Documents\NetBeansProjects\protobuftest\build\built-clean.proper
ties
Deleting directory C:\Users\thaler\Documents\NetBeansProjects\protobuftest\build
clean:
init:
deps-jar:
Created dir: C:\Users\thaler\Documents\NetBeansProjects\protobuftest\build
Updating property file:
C:\Users\thaler\Documents\NetBeansProjects\protobuftest\build\built-jar.properti
es
Created dir:
C:\Users\thaler\Documents\NetBeansProjects\protobuftest\build\classes
Created dir: C:\Users\thaler\Documents\NetBeansProjects\protobuftest\build\empty
Compiling 1 source file to
C:\Users\thaler\Documents\NetBeansProjects\protobuftest\build\classes
C:\Users\thaler\Documents\NetBeansProjects\protobuftest\src\protobuftest\Main.ja
va:3: package protobuftest.proto.Person does not exist
import protobuftest.proto.Person.PersonMessage;
C:\Users\thaler\Documents\NetBeansProjects\protobuftest\src\protobuftest\Main.ja
va:11: cannot find symbol
symbol : class PersonMessage
location: class protobuftest.Main
final PersonMessage person = PersonMessage.newBuilder().setName("Jack Jackson").setAge(22).build();
C:\Users\thaler\Documents\NetBeansProjects\protobuftest\src\protobuftest\Main.ja
va:11: cannot find symbol
symbol : variable PersonMessage
location: class protobuftest.Main
final PersonMessage person = PersonMessage.newBuilder().setName("Jack Jackson").setAge(22).build();
3 errors
C:\Users\thaler\Documents\NetBeansProjects\protobuftest\nbproject\build-impl.xml
:528: The following error occurred while executing this line:
C:\Users\thaler\Documents\NetBeansProjects\protobuftest\nbproject\build-impl.xml
:261: Compile failed; see the compiler error output for details.
BUILD FAILED (total time: 1 second)
Original comment by michael....@googlemail.com
on 9 Aug 2010 at 8:08
Attachments:
Any update on this? I get the same problem. I will get around this issue by
having my script build the required sources post-clean but this should be made
to work.
Original comment by david.ha...@gmail.com
on 23 Sep 2011 at 6:27
Original issue reported on code.google.com by
michael....@googlemail.com
on 3 Aug 2010 at 10:02Attachments: