windows下eclipse跑junit报错:CreateProcess error=206
from:http://isuifengfei.iteye.com/blog/1684262
windows下,eclipse中运行junit出现错误提示:
Exception occurred executing command line.
Cannot run program "D:\Program Files\Java\jdk1.6.0_30\bin\javaw.exe" (in directory "D:\work\mywork\20120829_159367_2\biz\product"): CreateProcess error=206, ÎļþÃû»ò)չÃû
原因是在Windows下命令行支持的字符串长度是有限制的,
在计算机上运行 Microsoft Windows XP 或更高版本,可以在命令提示符下使用的字符串的最大的长度 8191 个字符。
在运行 Microsoft Windows 2000 或 Windows NT 4.0 的计算机上, 将最大长度可以在命令提示符下使用的字符串的为 2047 个字符。
(参照微软官方文档:http://support.microsoft.com/kb/830473/zh-cn)
这个是eclipse的bug,参考:https://bugs.eclipse.org/bugs/show_bug.cgi?id=327193
解决办法:
(1)下载修复包:https://bugs.eclipse.org/bugs/attachment.cgi?id=219900
(2)把本地eclipse的eclipse/plugins/org.eclipse.jdt.launching_3.4.*.jar复制到一个安全的地方,便于恢复。
- copy your eclipse/plugins/org.eclipse.jdt.launching_3.4.*.jar to a safe place outside of the plugins folder, so that you always have a way to revert
- close Eclipse
(3)把jar重命名为zip
- rename the *.jar to *.zip
(4)打开zip包,拷贝下载的修复包里面的四个class文件到org\eclipse\jdt\internal\launching里面
- open the zip file and copy the 4 class files from the attachment to org\eclipse\jdt\internal\launching (replace existing files)
(5)进入META-INF目录,删除除了MANIFEST.MF以外的所有的文件
- go to META-INF in the zip file and delete all files except MANIFEST.MF
(6)解压MANIFEST.MF,删除以 "NAME:"开头的所有的entry(两行是一个entry)
- extract MANIFEST.MF to your disk and edit it with a text editor
- remove everything starting from the first "NAME:" entry
(7)保证MANIFEST.MF文件的结尾有两个空行
- make sure you leave *two* (2) line break characters at the end of the file!
(8)保存MANIFEST.MF进zip包
- save the MANIFEST.MF and copy it back into the zip file
(9)zip包重命名为jar
- rename the *.zip back to *.jar
(10)放到eclipse下面,替换之前的jar
- enjoy
高版本的eclipse(4.3 M1)已经修复这个bug了。
修改以后的jar包下载:http://download.csdn.net/download/goldenfish1919/6244901
windows下eclipse跑junit报错:CreateProcess error=206的更多相关文章
- Github上LeakCanary编译报错CreateProcess error=2的解决方法
现象说明: 从github上拉下LeakCanary编译时报错 CreateProcess error=2, ϵͳÕҲ»µ½ָ¶ 原因分析: 该现象是由于Windows中Gradle调用命令未加cmd ...
- linux下unzip解压报错“symlink error: File name too long”怎么办?提供解决方案。
点击上方↑↑↑蓝字[协议分析与还原]关注我们 " 分享unzip工具的一个bug." 最近在研究菠菜站,中间用到了Spidermonkey,碰到一些小波折,在这里分享出来,以便大家 ...
- ubuntu 下安装 mysql 启动报错:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
环境: ubuntu LTS 18.04.1 mysql Ver 14.14 Distrib 5.7.29, for Linux (x86_64) 初探 linux,按照如下安装完mysql sudo ...
- Windows下pip安装包报错:Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat
刚在机器上windows环境下装上pip方便以后安装包的时候使用,谁知道第一次使用pip安装asyncio的时候就报错. 在Windows7x64下使用pip安装包的时候提示报错:Microsoft ...
- Windows下安装模块mysqlclient报错处理
Windows环境下使用pip命令安装Python模块mysqlclientpip install mysqlclient安装过程报错 [error] Microsoft Visual C++ 14 ...
- 【python】 Windows下pip安装包报错:Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat
刚在机器上windows环境下装上pip方便以后安装包的时候使用,谁知道第一次使用pip安装asyncio的时候就报错. 在Windows7x64下使用pip安装包的时候提示报错:Microsoft ...
- (转)Windows下pip安装包报错:Microsoft Visual C++ 9.0 is required Unable to find vcvarsall.bat
刚在机器上windows环境下装上pip方便以后安装包的时候使用,谁知道第一次使用pip安装asyncio的时候就报错. 在Windows7x64下使用pip安装包的时候提示报错:Microsoft ...
- windows 下使用github客户端报错:Failed to publish this branch
在windows系统下使用github客户端同步的时候报错“Failed to publish this branch”,查找原因,发现结果是安装vscode的时候没有检查到git,然后安装git后库 ...
- [python]解决Windows下安装第三方插件报错:UnicodeDecodeError: 'ascii' codec can't decode byte 0xcb in position 0:
系统:win7IDE:pycharm Python版本:2.7 安装第三方插件是报错: 报错原因与编码有关,pip把下载的临时文件存放在了用户临时文件中,这个目录一般是C:\Users\用户名\Ap ...
随机推荐
- Java For循环效率试验
非常奇怪的结果! ..! 测试方法如以下 public class Main { public static void main(String[] args){ long ti = System.cu ...
- Linux命令: chown
touch auth.log root@ubuntu:/work# ls -l auth.log -rw-r--r-- 1 root root 0 Feb 18 19:27 auth.log chow ...
- source insight 中文注释为乱码解决
1. source insight 中文注释为乱码解决 http://blog.csdn.net/bingfeng1210/article/details/7527059 2. Source Insi ...
- c# 课堂总结7--函数
函数:数据类型-变量类型-运算符号表达式-语句(顺序,分支,循环)-数字 程序里的函数:能完成一个相对独立功能的代码块.数学里的函数:高度抽象.函数四要素:函数名,输入(参数),输出(返回值类型),加 ...
- 分享非常有用的Java程序 (关键代码) (一)
原文:分享非常有用的Java程序 (关键代码) (一) 分享一些非常有用的Java程序 (关键代码) ,希望对你有所帮助. 1. 得到当前方法的名字 String methodName = Th ...
- WPF4多点触摸事件
原文 WPF4多点触摸事件 UIElement在WPF4下添加了很多支持多点触摸的事件,通过它们可以在硬件支持的情况下处理多点触摸,以下通过代码来说明通过处理这些事件,我们可以做些什么: 一.触摸相关 ...
- JAVA类(上)
package test; public class staticAccess { public int age; public staticAccess grow() { age++; return ...
- (step6.1.5)hdu 1233(还是畅通工程——最小生成树)
题目大意:输入一个整数n,表示有n个村庄,在接下来的n*(n-1)/2中,每行有3个整数beigin.end.weight,分别表示路的起始村庄,结束村庄和村庄之间的距离. 求索要修的路的最短距离 解 ...
- HTTP协议--状态码
HTTP状态码负责表示客户端HTTP请求返回的结果.标记服务器端的处理是否正常.通知出现的错误等工作. 常用状态码共分5大类: 1XX:Informational,信息性状态码,接收的请求正在处理. ...
- Swift - 短信发送功能的实现
使用MessageUI.framework框架可以实现短信发送功能,步骤如下: (1)首先判断设备是否有发送短信功能 (2)如果设备允许发送短信,创建一个MFMessageComposeViewCon ...