CreateProcess error=206, The filename or extension is too long

前端 未结 3 463
一整个雨季
一整个雨季 2020-12-01 18:37

I\'m trying to call Findbugs via Ant, but receiving this error:

Cannot run program \"C:\\Program Files (x86)\\Java         


        
相关标签:
3条回答
  • 2020-12-01 19:17

    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

    0 讨论(0)
  • 2020-12-01 19:20

    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"

    0 讨论(0)
  • 2020-12-01 19:25

    I had the same problem. I used

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

    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.

    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>
    
    0 讨论(0)
提交回复
热议问题