0

C:\Users\1636820\Downloads\web3j-3.4.0\web3j-3.4.0\bin>web3j wallet create

             _      _____ _     _
            | |    |____ (_)   (_)
__      _____| |__      / /_     _   ___
 \ /\ / / _ \ '_ \     \ \ |   | | / _ \
 \ V  V /  __/ |_) |.___/ / | _ | || (_) |
  \_/\_/ \___|_.__/ \____/| |(_)|_| \___/
                         _/ |
                         |__/

Please enter a wallet file password:
 re-enter the password:
Please enter a destination directory location 
[C:\Users\1636820\AppData\Roaming\Ethereum\testnet\keystore]: 
C:\Users\1636820\Downloads\web3j-3.4.0\web3j-3.4.0\bin
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
    at org.bouncycastle.util.Arrays.clone(Unknown Source)
    at org.bouncycastle.crypto.generators.SCrypt.SMix(Unknown Source)
    at org.bouncycastle.crypto.generators.SCrypt.MFcrypt(Unknown Source)
    at org.bouncycastle.crypto.generators.SCrypt.generate(Unknown Source)
    at org.web3j.crypto.Wallet.generateDerivedScryptKey(Wallet.java:132)
    at org.web3j.crypto.Wallet.create(Wallet.java:70)
    at org.web3j.crypto.Wallet.createStandard(Wallet.java:89)
    at org.web3j.crypto.WalletUtils.generateWalletFile(WalletUtils.java:65)
    at 
org.web3j.crypto.WalletUtils.generateNewWalletFile(WalletUtils.java:56)
    at 
org.web3j.crypto.WalletUtils.generateFullNewWalletFile(WalletUtils.java:40)
    at org.web3j.console.WalletCreator.run(WalletCreator.java:39)
    at org.web3j.console.WalletCreator.main(WalletCreator.java:26)
    at org.web3j.console.WalletRunner.main(WalletRunner.java:23)
    at org.web3j.console.WalletRunner.run(WalletRunner.java:14)
    at org.web3j.console.Runner.main(Runner.java:35)

C:\Users\1636820\Downloads\web3j-3.4.0\web3j-3.4.0\bin>

How to solve this and where to save the wallet file ?

mani deep
  • 1
  • 1
  • 5

1 Answers1

0

The issue is right there in the exception:

Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

You can increase to 4GB on a 32 bit system. If you're on a 64 bit system you can go higher. No need to worry if you've chosen incorrectly, if you ask for 5g on a 32 bit system java will complain about an invalid value and quit.

As others have posted, use the cmd-line flags - e.g.

java -Xmx6g myprogram You can get a full list (or a nearly full list, anyway) by typing java -X.

Source: https://stackoverflow.com/a/1566026/3374428


You can try to use this alternative solution: https://lhalcyon.com/blockchain-eth-unlock-android/

Community
  • 1
  • 1
Joaquim Ley
  • 4,038
  • 2
  • 24
  • 42