且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

CreateProcess error = 206,运行main()方法时,文件名或扩展名太长

更新时间:2021-10-23 01:53:52

这个问题没有简单的解决方案(如点击或一个简单的命令)。

There is no simple (as in a couple of clicks or a simple command) solution to this issue.

Eclipse.org中的此错误报告中的某些答案引用这些都是解决方案。选择最不痛苦的一个:

Quoting from some answers in this bug report in Eclipse.org, these are the work-arounds. Pick the one that's the least painful to you:


  • 减少类路径

  • 使用目录而不是jar文件

  • 使用包含所有其他jar的打包jar文件,使用清单文件中的classpath变量指向其他jar

  • 使用从配置文件读取类路径的特殊类加载器

  • 尝试在错误报告文档中使用附加修补程序之一

  • 使用自己的包装蚂蚁

  • 移动到IntelliJ(更新:as @nitind指出,这不是一个选项)

  • Reduce the classpath
  • Use directories instead of jar files
  • Use a packed jar files which contains all other jars, use the classpath variable inside the manifest file to point to the other jars
  • Use a special class loader which reads the classpath from a config file
  • Try to use one of the attached patches in the bug report document
  • Use an own wrapper e.g. ant
  • Move to IntelliJ (Update: as @nitind points out, this is not an option)

更新:2014年7月以后,有一个更好的方式(感谢 @ Brad-Mace的回答如下

Update: After July 2014, there is a better way (thanks to @Brad-Mace's answer below:

如果您已经创建了自己的构建文件,而不是使用 Project - >生成Javadocs ,那么您可以将 useexternalfile =yes添加到专门用于解决此问题的Javadoc任务中。

If you have created your own build file instead of using Project -> Generate Javadocs, then you can add useexternalfile="yes" to the Javadoc task, which is designed specifically to solve this problem.