Using importer.h from java api

30 views
Skip to first unread message

ritesh singh

unread,
Mar 1, 2023, 9:26:33 AM3/1/23
to Protocol Buffers
Hello,

protoc --include_imports --descriptor_set_out=/dev/stdout user_preferences.proto

Instead of running the protoc  command from my application, which will basically shell out to user's machine and is dependent on user's machine protoc compiler.

I was wondering if there's an existing compiler api's which can be used from java.

I went through docs - and i guess importer can be used -  https://protobuf.dev/reference/cpp/api-docs/google.protobuf.compiler.importer/
But, this is not exposed as java api.

Thanks

ritesh singh

unread,
Mar 1, 2023, 3:08:46 PM3/1/23
to Protocol Buffers
This provides the support.
https://github.com/os72/protoc-jar
Reply all
Reply to author
Forward
0 new messages