Search code examples
eclipseblackberryeclipse-plugin

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


I have large number of class files , with field managers.I am getting this error Re: I/O Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified, on running the app.If i am excluding some classes it works fine for me ..Please suggest me how to resolve this error .


Solution

  • I have experienced the exact same issue with a project that contained a lot of classes. Due to the increase in the number of classes, the java jar file moves away from the root which causes issues in compiling.

    I was lucky to resolve this error. This link has been very helpful from BlackBerry Support Forums. The following steps resolved my issue:

    1. Right Click My Computer. Go To Properties.
    2. Click Advanced System Settings.
    3. Click Environment Variable
    4. Highlight PATH and click Edit. Add C:\Program Files (x86)\Java\jdk1.6.0_26\bin; to the start of the 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.