且构网

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

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

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

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

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 文件,使用清单文件中的类路径变量指向其他 jar
  • 使用特殊的类加载器从配置文件中读取类路径
  • 尝试使用错误报告文档中随附的补丁之一
  • 使用自己的包装器,例如蚂蚁

更新:2014 年 7 月之后,有更好的方法(感谢 @Brad-Mace 在下面的回答:

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

如果您创建了自己的构建文件而不是使用 Project ->生成Javadocs,然后可以在Javadoc任务中添加useexternalfile="yes",专门解决这个问题.

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.