CreateProcess error=206, 文件名或扩展名太长 [英] CreateProcess error=206, The filename or extension is too long

查看:453
本文介绍了CreateProcess error=206, 文件名或扩展名太长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过 Ant调用 Findbugs,但收到此错误:

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

我该如何解决这个问题?o.O

How can I fix this? o.O

推荐答案

我遇到了同样的问题.我用过

I had the same problem. I used

<fileset dir="${basedir}/build">
  <include name="**/*.class"/>
</fileset>

在 findbugs 目标中,似乎有太多 .class 文件要传递给 findbug(?通过命令行?),因为当我使用

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

<fileset dir="${basedir}/build/com/domain/package">
  <include name="**/*.class"/>
</fileset>

类的数量很少,错误消失了.

that had low number of classes, the error was gone.

所以,我通过制作一个 jar 文件并将其提供给 findbugs 目标来解决这个问题

So, I solved the problem by making one jar file and feeding it to findbugs target with

<findbugs home="${findbugs.home}">
  ...
  <class location="${basedir}/targets/classes-to-analyze.jar"/>
</findbugs>

这篇关于CreateProcess error=206, 文件名或扩展名太长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆