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 ...
随机推荐
- 零成本建立的.NET小组开发平台
前言 说道.NET开发平台,首先想到的就是Visual Studio,建立.NET小组开发平台自然首推TFS.但其花费却也是相当昂贵的(当然在本国可以无视这些成本),近期的开发中接触到一些开源软件并读 ...
- Hibernate 一对一关联映射
package com.entity; import javax.persistence.Entity; import javax.persistence.OneToOne; @Entity publ ...
- mysql入门记录
mysql -h localhost(or ID) -u root -p show databases; create database <数据库名>: drop database < ...
- 【Java Web】使用URLRewrite实现网站伪静态
大部分搜索引擎都会优先考虑收录静态的HTML页面,而不是动态的*.jsp.*.php页面.但实际上绝大部分网站都是动态的,不可能全部是静态的HTML页面,因此互联网上大部分网站都会考虑伪静态——就是将 ...
- 基于visual Studio2013解决C语言竞赛题之0903文件读写
题目
- Add custom and listview web part to a page in wiki page using powershell
As we know, Adding list view web part is different from custom web part using powershell, what's mor ...
- Swift UI开发初探
今天凌晨Apple刚刚发布了Swift编程语言,Swift是供iOS和OS X应用编程的新编程语言.相信很多开发者都在学习这门新语言. 废话不多说,下面我就来学习使用Swift创建一个简单的UI应用程 ...
- vim: 搭建vim看代码的环境
使用 vim + ctags + cscope + taglist 阅读源码 http://my.oschina.net/u/554995/blog/59927 vim tab变空格 http:// ...
- BZOJ 2693: jzptab( 莫比乌斯反演 )
速度居然#2...目测是因为我没用long long.. 求∑ lcm(i, j) (1 <= i <= n, 1 <= j <= m) 化简之后就只须求f(x) = x∑u( ...
- 基于visual Studio2013解决C语言竞赛题之1040因数分解
题目 解决代码及点评 /* 将一个数M分解为质因数(M≠0). */ #include <stdio.h> #include <stdlib.h> void main() ...