黑莓手机不能运行的程序和QUOT;瓶和QUOT;:CreateProcess的错误= 2,系统找不到指定的文件 [英] BlackBerry Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified

查看:1663
本文介绍了黑莓手机不能运行的程序和QUOT;瓶和QUOT;:CreateProcess的错误= 2,系统找不到指定的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个BlackBerry应用程序与一些它的类文件;此刻16的Java类和他们继续增加,因为这程序是复杂了很多的屏幕和功能。我在Eclipse工作与黑莓的Java插件。我使用黑莓6.0 JRE。我最近已经开始收到以下错误:

I am developing a BlackBerry Application with a number of class files in it; 16 java classes at the moment and they keep increasing as this App is complex with a lot of screen and features. I am working in Eclipse with the BlackBerry Java Plug-in. I am using BlackBerry JRE 6.0. I have recently started getting the following error:

错误:不能运行程序罐子:CreateProcess的错误= 2,系统找不到指定文件

Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified

我有谷歌这个错误,许多人认为这是由Java的环境变量PATH引起的。不过,我已签,一切似乎就细在我结束。我已经注意到,当类的数量增加或类变得更加冗长,出现此错误。我得到通过减少在项目类的数量摆脱错误的。我创建分离项目将每个之间的类,它编译罚款。所以我认为,与源$ C ​​$ C无问题。

I have Google for this error and many suggest this is caused by Java Environmental Variable path. However, I have checked and everything seems to be fine at my end regarding that. I have noticed that when the number of classes is increased or a class becomes more lengthy, this error occurs. I get rid of the error by reducing the number of classes in a project. I created separated projects dividing the classes between each and it compiled fine. So I can believe that there is no issue with the source code.

任何人都可以指导如何在包含几类单个项目克服了这个错误。请帮助。

Can anyone guide how to overcome this error in a single project that contains several classes. Please help.

编辑:我碰上了以下在BlackBerry支持论坛:

I came across the following on BlackBerry Support Forums:

我认为这是最常见的原因(假设你安装了JDK)是在项目中大量文件和/或项目目录是从根很远。

"I think the most common reason for this (assuming that you have the JDK installed) is a large number of files in the project, and/or a project directory that is very far from the root.

问题是,RAPC编译器调用JAR实用工具,构建包含在应用程序中的所有类文件的命令行。如果在命令行长度超过了系统允许的最大长度,你会得到这个错误。

The issue is that the RAPC compiler calls the JAR utility, building a command line that consists of all the class files in the application. If the command line length exceeds the maximum length allowed by the system, you will get this error."

如何解决此,如果这是什么导致它。

How to work around this IF this is whats causing it.

推荐答案

我很幸运,来解决这个错误。 <一href=\"http://supportforums.blackberry.com/t5/Java-Development/why-cause-more-then-100-compiled-classes-packaging-I-O-error/td-p/520282\"相对=nofollow>这个链接已经从黑莓支持论坛非常有帮助。对于任何人都面临着同样的问题,以下步骤解决我的问题:

I was lucky to resolve this error. This link has been very helpful from BlackBerry Support Forums. For anyone else facing the same issue, the following steps resolved my issue:


  1. 右键点击我的电脑。转到属性。

  2. 单击高级系统设置。

  3. 单击环境变量

  4. 突出显示路径,然后单击编辑。添加C:\\ Program Files文件(x86)的\\的Java \\ jdk1.6.0_26 \\ BIN;到PATH的开始。

步骤4增加了java的jar文件到PATH变量,并增加了更贴近根。编译的一些类项目时添加接近根是很有帮助的。

Step 4 adds the java jar file to the PATH variable and adds it closer to the root. Adding closer to the root is helpful when compiling a project with several classes.

这篇关于黑莓手机不能运行的程序和QUOT;瓶和QUOT;:CreateProcess的错误= 2,系统找不到指定的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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