CreateProcess error = 206,运行main()方法时,文件名或扩展名太长 [英] CreateProcess error=206, The filename or extension is too long when running main() method

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

问题描述

我在eclipse helios中有这个错误:

I have this error in eclipse helios:

执行命令行时发生异常。
无法运行程序C:\Program Files(x86)\Java\jre6\bin\javaw.exe(在目录C:\Users\motiver\helios_workspace\TimeTracker ):CreateProcess error = 206,文件名或扩展名太长

我研究了一点,但大部分问题与DataNucleus有关Google App Engine。但是我没有使用任何与Google App Engine远程相关的内容。我在JBOSS 6上使用Servlet 3.0做一个小项目。我正在使用Hibernate 4.1.2进行ORM和RESTEasy公开Web服务。我创建了一个有一个main()方法的util文件,它基本上会丢弃并重新创建模式。当我需要一个干净的数据库进行测试时,我运行main()methos。它在Tomcat 7上工作正常,但是当我移动到JBoss 6时它停止工作。

I researched a bit but most of the issues were related to DataNucleus when working on Google App Engine. But I am not using anything remotely related to Google App Engine. I am doing a small project with Servlet 3.0 on JBOSS 6. I am using Hibernate 4.1.2 for ORM and RESTEasy to expose a web service. I created a util file that has a main() method that basically drops and re-creates the schema. I run the main() methos when I need a clean database for testing purposes. It worked fine on Tomcat 7 but it stopped working when I moved to JBoss 6.

任何提示或解决方案将不胜感激。

Any hint or solution would be greatly appreciated.

推荐答案

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

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.

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

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