How to use a smart contract from a java application
In Part I of my tutorial I’ve explained how to develop and deploy a simple smart contract. Today we will see how this deployed contract can be used in java applications.
We are going to use Parity as Ethereum client and Web3j java library for interaction with Parity. I’m assuming that you already have installed Web3j, solc and Parity following “Prepare” instructions in Part I.
5. Get Parity Synced
First of all your Parity needs to get synchronized with the Ethereum testnet Rinkeby, meaning it needs to download the current database status to your local machine. Start your local parity with
$parity --chain rinkeby --rpcapi "eth,net,web3,personal"
See also this documentation of Parity about getting synced.
In the meantime, we can prepare everything that we need to call our smart contract from a java application.
Read More