I am stuck at one point. The function call is not able to read data from .env file.
This is the main file:
public static void main(String[] args) throws HederaReceiptStatusException, TimeoutException, HederaPreCheckStatusException {
//Grab your Hedera testnet account ID and private key
AccountId myAccountId = AccountId.fromString(Dotenv.load().get("MY_ACCOUNT_ID"));
PrivateKey myPrivateKey = PrivateKey.fromString(Dotenv.load().get("MY_PRIVATE_KEY"));
......
This is the .env
file:
MY_ACCOUNT_ID=TESTNET ACCOUNT ID(0.0.1755600)
MY_PRIVATE_KEY=TESNET PRIVATE KEY(302e020100300506032b657004220420c802435424acd5c73733473532551277503ffd4dcccd1042fc657907828708a5)
It seems that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
Please refer java docs for NumberFormatException