I am using the readme guide https://github.com/web3j/web3j. What I am interested is developing smart contracts from my host with java + web3j to private ethereum network which runs on my virtual machine. There are such lines:
Web3j web3 = Web3j.build(new HttpService()); // defaults to http://localhost:8545/
Credentials credentials = WalletUtils.loadCredentials("password", "/path/to/walletfile");
So the question is – how should I create this wallet? Should I generate account on my VM and then copy wallet.json file to my host?
Best Answer
The wallet file is your encrypted private key file. you have the choice to :
1-use the private key file from the web3js or ethereum keystore.
you will find something like :
use it a second parameter in
WalletUtils.loadCredentials
2- creating the wallet fine using web3j
3-use Myetherwallet to export your 'wallet' as a json file.