在 Windows 中出现错误=206 调试 CordApp-Tutorial

Getting error=206 debugging CordApp-Tutorial in Windows

我在 Windows 上调试 CordApp-Tutorial 时遇到以下错误:

Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long

我已经尝试缩短路径,但没有成功。有人遇到这个错误吗?

PS。此错误仅发生在 release-M13 上,因为 Main class 从 main 更改为 test 模块。

这是通过在驱动器的根目录(例如 c:\jdk-1.8.0_131)安装 JDK 并指向 IntelliJ 来缩短路径解决的

如果您使用的是gradle,您还可以安装this plugin

下面引用他们的文档

When classpath for a Gradle JavaExec task is long, Windows command executions give error because of limitation to command line length greater than 32K.

在大型项目中有许多类路径依赖项,通常 JavaExec Gradle 任务失败并出现错误 "The filename or extension is too long",这将是一个停止错误。要解决此问题,请使用 ManifestClasspath 插件。

ManifestClasspath 插件在 JavaExec 任务的类路径中为 jar 文件创建一个清单 jar,并使用清单 jar 设置类路径。