Home > Uncategorized > Cannot run program “C:\Program”: CreateProcess error

Cannot run program “C:\Program”: CreateProcess error

When building a Webworks / Phonegap app for BlackBerry, I got the following error message from ANT:

[exec] [INFO] Parsing command line options
[exec] [INFO] Parsing bbwp.properties
[exec] [INFO] Validating application archive
[exec] [INFO] Parsing config.xml
[exec] [INFO] Populating application source
[exec] [INFO] Compiling BlackBerry WebWorks application
[exec] I/O Error: Cannot run program “C:\Program”: CreateProcess error=2, The system cannot find the file specified
[exec] [ERROR] RAPC exception occurred

This happened just after updating Java on my computer, so I assumed that it was something to do with Java, and that it was cutting off “Program Files” to “Program”.

After hunting around for the reference to Java that ANT uses, I spotted the file C:\BBWP\bin\bbwp.properties, which containted the following XML:

<?xml version=”1.0″ encoding=”UTF-8″?>
<java>C:\Program files\Java\jdk1.6.0_25</java>

So, using the old DOS hack, I changed Program files to “Progra~1”


And re-ran ANT BUILD, and it worked!


Categories: Uncategorized
  1. Bryan
    May 9, 2013 at 1:47 am

    Ugh. I’m having the exact same problem, but your solution didn’t solve it.

    Any clues what else might be the cause?


    • Himanshu
      May 23, 2013 at 6:12 am

      what is the path of your bbwp.exe?


  2. Himanshu
    May 23, 2013 at 6:11 am

    It solved the problem for me… thanks a lot man šŸ™‚


  3. Esuruoso Abimbola
    May 25, 2013 at 1:36 am

    I have the same issue but, I’m using a x64 bit system so mine is:

    C:\Program Files (x86)\Java\jdk1.6.0_43

    Any help solving this please? Thanks!


    • June 10, 2013 at 3:27 am

      Try C:\Progra~2\Java\jdk1.6.0_43, is working for me, I’m using java jdk 1.6.0_45 and works great, didn’t have to downgrade. šŸ™‚


  4. Naresh
    July 23, 2013 at 1:46 pm

    I am using java 7. And I have solved this issue.
    try this


  5. September 25, 2013 at 12:52 pm

    how to change program files to progra~1? please reply i need it badly


    • Abim
      October 3, 2013 at 7:39 am

      Change it in your PATH under Environment variables.


  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: