What are the wallet path credentials for Web3j

+2 votes

I want to develop smart contracts from my host with java + web3j to a private ethereum network which runs on my virtual machine. I am using the readme guide https://github.com/web3j/web3j. Look at the following lines:

Web3j web3 = Web3j.build(new HttpService());  // defaults to http://localhost:8545/
Credentials credentials = WalletUtils.loadCredentials("password", "/path/to/walletfile");

 How should I create this wallet? Should I generate an account on my VM and then copy wallet.json file to my host?

Jun 26, 2018 in Blockchain by Johnathon
• 9,090 points
1,917 views

1 answer to this question.

0 votes

Follow the below steps:

  • Go to the private key file (For geth: AppData/Ethereum/keystore and for ethAppData/Web3/keys)
  • Find the key. It'll something like this: 
Ethereum\keystore\UTC--2018-3-14T11-51-50.069518500Z--228fh83c240g512be19d3f28dna5d7f0333jfoim
  • Use this as the second parameter in the WalletUtils.loadCredentials 
To create the wallet using web3j:
String fileName = WalletUtils.generateNewWalletFile(
        "your password",
        new File("/path/to/destination"));


Alternatively, you can use https://www.myetherwallet.com/
answered Aug 2, 2018 by Omkar
• 69,220 points

Related Questions In Blockchain

0 votes
1 answer

What path should I give for credentials in web3j?

WalletUtils.loadCredentials can be buggy, I would recommend ...READ MORE

answered Jun 27, 2018 in Blockchain by Shashank
• 10,400 points
930 views
0 votes
1 answer

What happen to the mining fee for the blocks that are stale?

As I understood the forks of the ...READ MORE

answered Jun 4, 2018 in Blockchain by Shashank
• 10,400 points
689 views
+2 votes
1 answer

What are the difference between various Hyperledger Projects?

Hyperledger incubates a plethora of business blockchain ...READ MORE

answered Mar 26, 2018 in Blockchain by Perry
• 17,100 points
1,460 views
+4 votes
4 answers

What are the implementations of IBM blockchain?

IBM is an open source community of ...READ MORE

answered Mar 30, 2018 in Blockchain by Christine
• 15,790 points
1,135 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,922 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,451 views
+3 votes
2 answers

How to run ethereumjs using Node.JS

You need to install testrpc globally on ...READ MORE

answered Mar 27, 2018 in Blockchain by ned_crew
• 1,610 points
1,413 views
+15 votes
2 answers

What are the various blockchain smart contracts platforms?

While Ethereum is the most popular platform ...READ MORE

answered Mar 27, 2018 in Blockchain by Johnathon
• 9,090 points
1,194 views
+1 vote
7 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP