日期:2014-05-20  浏览次数:20747 次

netbeans 下polish项目运行报错
这段报错信息是怎么引起的
java.io.IOException: Cannot run program "preverify.exe": CreateProcess error=2, ??Õ?»µ½?¶
  at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
  at java.lang.Runtime.exec(Runtime.java:593)
  at de.enough.polish.util.ProcessUtil.exec(ProcessUtil.java:179)
  at de.enough.polish.util.ProcessUtil.exec(ProcessUtil.java:159)
  at de.enough.polish.util.ProcessUtil.exec(ProcessUtil.java:107)
  at de.enough.polish.util.ProcessUtil.exec(ProcessUtil.java:67)
  at de.enough.polish.preverify.CldcPreverifier.preverify(CldcPreverifier.java:94)
  at de.enough.polish.preverify.Preverifier.execute(Preverifier.java:85)
  at de.enough.polish.ant.PolishTask.preverify(PolishTask.java:2679)
  at de.enough.polish.ant.PolishTask.execute(PolishTask.java:599)
  at de.enough.polish.ant.PolishTask.execute(PolishTask.java:430)
  at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  at org.apache.tools.ant.Task.perform(Task.java:348)
  at org.apache.tools.ant.Target.execute(Target.java:357)
  at org.apache.tools.ant.Target.performTasks(Target.java:385)
  at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
  at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
  at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
  at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:278)
  at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:498)
  at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
Caused by: java.io.IOException: CreateProcess error=2, ??Õ?»µ½?¶
  at java.lang.ProcessImpl.create(Native Method)
  at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
  at java.lang.ProcessImpl.start(ProcessImpl.java:30)
  at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
  ... 26 more
E:\Documents and Settings\markettao\My Documents\NetBeansProjects\CVMS_EX\build.xml:108: Unable to preverify for device [Generic/AnyPhone]: java.io.IOException: Cannot run program "preverify.exe": CreateProcess error=2,

------解决方案--------------------
将项目建到不带空格和中文的目录中看看
------解决方案--------------------
java.io.IOException: Cannot run program "preverify.exe": CreateProcess error=2 ??Õ?»µ½?¶
出现乱码。。因为与中文有关,参考楼上意见看看可行否