Cannot run program “C:\Program”: CreateProcess error
When building a Webworks / Phonegap app for BlackBerry, I got the following error message from ANT:
build:
[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″?>
<wcp>
<additional>-quiet</additional>
<extension_repository>ext</extension_repository>
<jar>lib\net_rim_api.jar</jar>
<java>C:\Program files\Java\jdk1.6.0_25</java>
<rapc>bin\rapc.exe</rapc>
<wcp_template>device_templates</wcp_template>
</wcp>
So, using the old DOS hack, I changed Program files to “Progra~1”
<java>C:\Progra~1\Java\jdk1.6.0_25</java>
And re-ran ANT BUILD, and it worked!
Ugh. I’m having the exact same problem, but your solution didn’t solve it.
Any clues what else might be the cause?
LikeLike
what is the path of your bbwp.exe?
LikeLike
It solved the problem for me… thanks a lot man 🙂
LikeLike
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!
LikeLike
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. 🙂
LikeLike
I am using java 7. And I have solved this issue.
try this
C:\Progra~2\Java\jdk1.7.0_25
LikeLike
how to change program files to progra~1? please reply i need it badly
LikeLike
Change it in your PATH under Environment variables.
LikeLike