Protobuf with Java

6 views
Skip to first unread message

Lars Persson

unread,
Sep 5, 2025, 10:04:46 AM (15 hours ago) Sep 5
to Protocol Buffers
Ok, so I am new to protobuf and are trying to read a .pb-file

I used Protoc and have generated the Java-file.

Now what? The files showed up in com/google/transit/realtime.

I get som errors. For one the:
Package com.google.transit.realtime;

Should the Javafile be where protoc placed it?

Em Rauch

unread,
Sep 5, 2025, 10:29:38 AM (15 hours ago) Sep 5
to Lars Persson, Protocol Buffers
Java requires that a file with a given package be in a directory structure which matches the package. Protoc does try to place it in an appropriate directory based on the package name.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/protobuf/0ba3ef87-1e5c-4c4d-a43b-41b23c191f5en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages