📦 bitcoind-java-sample - Sample Project using Bitcoind API
First of all, you need to setup your Bitcoind RPC server to have it ready to connect. In case you need, the project Learning Bitcoin from the Command Line will guide you on how to setup a VPS server with a fully functional Bitcoin Core running.
After the server is setup, you can clone this project:
$ git clone https://github.com/brunocvcunha/bitcoind-java-client-sample
To be able to run it, you need to change the BitcoindMain.java
file to match your server configurations (rpcuser
and rpcpassword
on the bitcoin.conf file), as well as the IP (8332 for mainnet, 18332 for testnet):
BitcoindRpcClient rpcClient = new BitcoinJSONRPCClient("http://bitcoinrpc:rpcpassword@localhost:18332");
After the setup is done, you are able to execute the BitcoindMain
class using the Maven exec:java
goal:
mvn exec:java -Dexec.mainClass=org.brunocvcunha.bitcoind.BitcoindMain
bitcoind-java-sample requires at minimum Java 8.