CreateProcess error=206,文件名或扩展名太长
我尝试通过 Ant调用Findbugs,但收到此错误:
Cannot run program "C:\Program Files (x86)\Java\jre6\bin\javaw.exe" (in
directory "H:\Users\MyName\workspace\MyProject"):
CreateProcess error=206, The filename or extension is too long
我该如何修复此问题? oO
I'm trying to call Findbugs via Ant, but receiving this error:
Cannot run program "C:\Program Files (x86)\Java\jre6\bin\javaw.exe" (in
directory "H:\Users\MyName\workspace\MyProject"):
CreateProcess error=206, The filename or extension is too long
How can I fix this? o.O
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我也有同样的问题。
我
在 findbugs 目标内部使用了它,似乎有太多的 .class 文件要传递给 findbug (?通过命令行?),因为当我使用
类数量较少的文件时,错误就消失了。
因此,我通过制作一个 jar 文件并将其提供给 findbugs 目标来解决这个问题
I had the same problem.
I used
inside findbugs target and it seems that there is too much .class files to be passed to findbug (?via command line?) because when I used
that had low number of classes, the error was gone.
So, I solved the problem by making one jar file and feeding it to findbugs target with
我认为当 java 尝试编译类时,有效文件路径之一非常长。
一个值得尝试的方法是将代码库放在 C:\MyProject 等目录中,而不是 C:\Users\MyName\workspace\MyProject 之类的目录中
I think one of the effective file paths are really long when java tries to compile clases.
One worth try is to put codebase in a directory such as C:\MyProject instead of something like C:\Users\MyName\workspace\MyProject
要解决此问题,您需要生成一个清单类路径和一个路径 jar。
首先生成你的类路径。
Next 生成您的 Manifestclasspath
Next 实现您的 Manifestclasspath
如果正确实现,这将解决 206 错误消息。
To solve this issue you need to generate a manifestclasspath and a pathing jar.
First Generate your classpath.
Next Generate your manifestclasspath
Next Implement your Manifestclasspath
This will solve the 206 error message if implemented correctly.
仅启动调试模式时,我在 IntelliJ 上遇到了相同的错误。要解决的是我已经更改:
运行> 编辑配置 > “配置”选项卡 > 将命令行缩短
为“JAR-manifest”
I had the same error on IntelliJ while starting debug mode only. To fix is I've changed:
Run > Edit Configurations > "Configuration" tab > Shorten command line
to "JAR-manifest"