0

C:\Users\1636820\Downloads\web3j-3.4.0\web3j-3.4.0\bin>web3j 钱包创建

             _      _____ _     _
            | |    |____ (_)   (_)
__      _____| |__      / /_     _   ___
 \ /\ / / _ \ '_ \     \ \ |   | | / _ \
 \ 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>

如何解决这个问题以及将钱包文件保存在哪里?

4

1 回答 1

0

问题就在例外中:

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

您可以在 32 位系统上增加到 4GB。如果您使用的是 64 位系统,则可以更高。如果您选择不正确,无需担心,如果您在 32 位系统上要求 5g,java 会抱怨无效值并退出。

正如其他人发布的那样,使用命令行标志 - 例如

java -Xmx6g myprogram 你可以通过输入 java -X 得到一个完整的列表(或者几乎是完整的列表)。

来源:https ://stackoverflow.com/a/1566026/3374428


您可以尝试使用此替代解决方案:https ://lhalcyon.com/blockchain-eth-unlock-android/

于 2019-08-03T12:19:13.793 回答