Generate Java bindings for Go packages using a forked version of gomobile.
GoJava is a command-line tool that generates Java bindings for Go packages, allowing Java applications to seamlessly call Go code. It solves the problem of interoperability between Go and Java by creating JAR files with native libraries and Java interfaces. The tool uses a forked version of gomobile to handle type conversions and binding generation.
Developers working in mixed Go and Java environments who need to integrate Go libraries into Java applications, such as those building cross-language microservices or leveraging Go's performance in Java-based systems.
GoJava provides a simple, tool-based solution for Go-Java interoperability without requiring manual FFI or complex bridging code. Its use of gomobile ensures reliable type support and native library integration, making it a practical choice for projects that depend on both ecosystems.
GoJava - Java bindings for Go packages
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The generated JAR automatically loads platform-specific native libraries, eliminating manual deployment steps for native code integration.
Supports the same set of types as the original gomobile bind tool, ensuring reliable type conversions between Go and Java.
JAR files can be integrated with any Java build tool like Maven or Gradle, providing flexibility without vendor lock-in.
Offers a straightforward command-line tool for generating bindings, reducing the complexity of creating cross-language interfaces.
Cross-platform builds are not supported, limiting deployment to the build machine's operating system, as stated in the README.
Only tested on OSX and Linux in development environments, with no validation for production use, increasing risk for critical applications.
Relies on a forked version of gomobile, which may not receive timely updates or maintain compatibility with upstream changes.