Prerequisites
- JDK 11 or later
- Maven 3.8+ or Gradle 8+
- A Hedera testnet account with ECDSA keys from the developer portal
Step 1: Add the SDK dependency
For Maven, add topom.xml:
build.gradle:
grpc-netty-shaded is the network transport. Without it the SDK compiles, then throws at runtime when you actually try to talk to the network.
Step 2: Credentials
Create a.env file in your project root (and add it to .gitignore):
OPERATOR_ID is your Hedera account ID (for example, 0.0.1234). OPERATOR_KEY is your account’s ECDSA private key: copy the DER Encoded Private Key (starts with 303...) from the developer portal.
Step 3: Connect, query, transfer
Createsrc/main/java/HederaQuickstart.java:
Step 4: Run it
What’s next
Create an Account
Generate a new account programmatically and fund it from your operator.
Create a Token
Mint a native HTS token with custom supply and decimals.
Submit to a Topic
Publish a message to HCS for verifiable, ordered audit logs.
SDK Reference
Full API reference on GitHub.