mirror of
https://github.com/apache/thrift.git
synced 2026-10-29 00:46:21 +08:00
Client: java, tutorial Migrated tutorial/java from Apache Ant (build.xml, build.properties) to Gradle: - Added build.gradle with Java and Application plugins. - Configured Gradle composite build (includeBuild) to build and consume libthrift directly. - Added generateThrift task to invoke thrift compiler on tutorial.thrift and shared.thrift. - Added tutorial, tutorialServer, and tutorialClient tasks for running the tutorial. - Updated JavaServer and JavaClient SSL keystore/truststore paths to valid crossTest resource locations. - Updated Makefile.am to invoke Gradle instead of Ant and updated EXTRA_DIST. - Updated README.md with Gradle execution instructions. - Added /tutorial/java/.gradle/ to .gitignore. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Thrift Java Tutorial
-
Compile the Java library
thrift/lib/java$ make or:
thrift/lib/java$ gradle assemble
-
Run the tutorial:
start server and client with one step:
thrift/tutorial/java$ make tutorial
or:
thrift/tutorial/java$ gradle tutorial
or run server and client in separate terminals:
thrift/tutorial/java$ make tutorialserver
thrift/tutorial/java$ make tutorialclient
or:
thrift/tutorial/java$ gradle tutorialServer
thrift/tutorial/java$ gradle tutorialClient