【问题标题】:Getting started on Corda on Windows在 Windows 上开始使用 Corda
【发布时间】:2019-10-04 16:25:10
【问题描述】:

我正在尝试在 Windows 上开始使用 Corda,并且我正在使用以下文档遵循入门指南:

我已经下载了所有最新版本(截至 22.09.19)的 Git(2.23.0,64 位版本)/Java JDK(jdk-8u221-windows-x64.exe)/和最新的 IntelliJ。

但是我面临以下问题:

  1. 当我打开“事件日志”时,我没有看到任何消息事件分级消息

  2. 此外,当我尝试从 Intellj > Run CordaApps Kotlin 运行节点时,我收到以下错误消息:

  3. 当我尝试从 Git bash 终端运行节点时

    Jatin@LAPTOP-16QRBJDJ MINGW64 ~/cordapp-tutorial (release-V3)
    
    $ ./gradlew.bat deployNodes
    Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
    :java-source:compileJava UP-TO-DATE
    :java-source:processResources UP-TO-DATE
    :java-source:classes UP-TO-DATE
    :java-source:configureCordappFatJar
    :java-source:jar UP-TO-DATE
    :java-source:deployNodes
    Bootstrapping local network in C:\Users\Jatin\cordapp-tutorial\java-source\build\nodes
    Node config files found in the root directory - generating node directories
    Generating directory for Notary
    Generating directory for PartyA
    Generating directory for PartyB
    Generating directory for PartyC
    Nodes found in the following sub-directories: [Notary, PartyA, PartyB, PartyC]
    Waiting for all nodes to generate their node-info files...
    :java-source:deployNodes FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':java-source:deployNodes'.
    > Node in Notary exited with 1 when generating its node-info - see logs in C:\Users\Jatin\cordapp-tutorial\java-source\build\nodes\Notary\logs
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
    
    * Get more help at https://help.gradle.org
    
    BUILD FAILED in 23s
    5 actionable tasks: 2 executed, 3 up-to-date
    

    日志:

    CAPSULE EXCEPTION: Illegal char <"> at index 34: C:\Program Files\Java\jdk1.7.0\bin" (for stack trace, run with -Dcapsule.log=verbose)
    USAGE: <options> corda.jar
    
      Actions:
      capsule.version - Prints the capsule and application versions.
      capsule.modes - Prints all available capsule modes.
      capsule.jvms - Prints a list of all JVM installations found.
      capsule.help - Prints this help message.
    
      Options:
      capsule.mode=<value> - Picks the capsule mode to run.
      capsule.reset - Resets the capsule cache before launching. The capsule to be re-extracted (if applicable), and other possibly cached files will `enter code here`be recreated.
      capsule.log=<value> (default: quiet) - Picks a log level. Must be one of none, quiet, verbose, or debug.
      capsule.java.home=<value> - Sets the location of the Java home (JVM installation directory) to use; If 'current' forces the use of the JVM that launched  the capsule.
      capsule.java.cmd=<value> - Sets the path to the Java executable to use.
      capsule.jvm.args=<value> - Sets additional JVM arguments to use when running the application."
    

【问题讨论】:

标签: gradle intellij-idea


【解决方案1】:

您是否将 Java 类路径设置为指向 jdk1.8.0_221?

从日志记录看来jdk是1.7的。 Corda 至少需要 8u171 版本。请检查类路径和安装的java版本。

您应该按照 Oracle 文档“https://docs.oracle.com/javase/7/docs/webnotes/install/windows/jdk-installation-windows.html#path”中的说明将 Java 添加到 PATH 环境变量中

【讨论】:

    【解决方案2】:

    您使用的是哪个 java 变体?

    如果是 Adopt OpenJDK 8,请使用 HotSpot JVM 而不是 OpenJ9 版本。

    这里是 windows x64 AdoptOpenJDK 8的链接

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-11-10
      • 1970-01-01
      • 2010-11-29
      • 2023-04-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-07
      • 1970-01-01
      相关资源
      最近更新 更多