Create process error = 206 when running junittest

Explain the function of static keyword and final keyword in Java in detail>>>

Error prompt when running TestNG:

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, ÎļþÃû»ò)չÃû

The reason is that the string length supported by the command line under windows is limited,

When running Microsoft Windows XP or later on a computer, the maximum length of a string that can be used at the command prompt is 8191 characters.

On a computer running Microsoft Windows 2000 or Windows NT 4.0, set the maximum length of a string that can be used at the command prompt to 2047 characters.

(refer to Microsoft official document: )

A simple solution is:

Note that the full path of my project directory is D:: – work/mywork/20120829_ 159367_ In this way, every file loaded will be preceded by the full path string. In order to reduce the number of characters, you can put the project in the root directory. In addition, the path of the jar package under the classpath should be as short as possible. If Maven is used, the local storage path can be set in the folder under the root directory.

Another way is

The first step is to download the file
the second step is to back up the local eclipse/plugins/org.eclipse.jdt.launching_ 3. *. Jar
Step 3 copy the class file of to replace your org.eclipse.jdt.launching_ 3. Under the path of Org/eclipse/JDT/internal/launching in *. Jar
the fourth step is to modify org.eclipse.jdt.launching_ 3. *. Jar’s meta-inf/ file.
delete the element beginning with ‘name’ until the last two lines, and keep the last two lines (that is, the element beginning with the last name)

Step 5: restart eclipse.
download the last file address
the last line bug.cgi?id=327193

Similar Posts: