capnproto-java
capnproto-java copied to clipboard
need better setup documentation
For example, where is java.capnp
?
To answer that specific question: you can tell the schema compiler where to find java.capnp
by invoking it like this: capnp compile -I compiler/src/main/schema
. Alternatively, you could copy java.capnp
into the installed capnp include directory, where you will also find schema.capnp
and c++.capnp
.
Does that clear things up? What else is causing trouble? (These questions are specifically addressed to Luc Perkins, who initially raised this issue on Twitter, but anyone else should feel welcome to chime in!)
Hi, I followed your suggestions and copied java.capnp onto the include dir and now I get
capnp compile -ojava addressbook.capnp
java: no such plugin (executable should be 'capnpc-java')
java: plugin failed: exit code 1
Hi @mfirry. Using the -ojava
flag like that will only work if capnpc-java
is in your current directory or in your PATH
. You can instead invoke it like capnp compile -o/path/to/capnpc-java
.
See capnp compile --help
.
Great. Thanks!
I was receiving the same error as @mfirry, and using the capnp compile -o/path/to/capnpc-java
did not work for me.
However, placing capnpc-java
and the .cpnp source file in the same directory and using
capnp compile -o./capnpc-java mySourceFile.capnp
Did the trick!
Hopefully someone else struggling with this issue finds this useful.