Install the Hedera Java SDK with Maven or Gradle, configure testnet operator credentials, query your account balance, and submit an HBAR transfer transaction.
This page gets a Java application talking to Hedera testnet: SDK install, operator credentials, balance query, and an HBAR transfer.
OPERATOR_ID is your Hedera account ID. OPERATOR_KEY is the DER-encoded ECDSA private key; use the HEX Encoded Private Key value from the developer portal.
# Maven (package as a JAR with dependencies, then run it)mvn packagejava -cp target/your-artifact-with-dependencies.jar HederaQuickstart# Gradle./gradlew run
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.
The four Hiero SDKs (JavaScript, Java, Go, Python) share the same API surface, so code translates almost line-for-line between them. Differences are mostly language-idiomatic.