Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 8
Registered: ‎05-31-2009
My Device: Not Specified
Accepted Solution

Cannot run program "javac": CreateProcess error=2,

Hi,

 

I am a beginner starting on blackberry SDK and am in the process of getting familiar with blackberry SDK.

 

I installed BB SDK 4.6.0.12. The JDK that I have is  1.6.14. I was trying to run the "Hello World" application that came with the BB SDK.However I keep getting the following message while trying to compile it:

 

C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\bin\rapc.exe  -quiet import=..\lib\net_rim_api.jar codename=com\rim\samples\device\helloworlddemo\HelloWorldDemo com\rim\samples\device\helloworlddemo\HelloWorldDemo.rapc warnkey=0x52424200;0x52525400;0x52435200 "C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\samples\com\rim\samples\device\helloworlddemo\HelloWorldDemo.java" "C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\samples\com\rim\samples\device\helloworlddemo\img\helloworld_jde.png"
I/O Error: Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified
Error while building project

 

I searched on the forums and found that we need to have JDK 1.4.2.15. Please note that I have set the PATH variable accordingly pointing to BB SDK and JDK bin directories. But I can not find this version as it has reached it's end of life and no longer available anywhere for download. I was wondering if the requirement to have 1.4.2 still holds true. If so, where can I download it from. If not, what am I missing here. 

 

I would appreciate if someone could help me out as I am getting frustrated now trying to make it compile for more than a week.

 

Thanks in advance,

Nick

New Developer
Posts: 8
Registered: ‎05-31-2009
My Device: Not Specified

Re: Cannot run program "javac": CreateProcess error=2,

here is the PATH variable that I have:

 

C:\Program Files\Research In Motion\BlackBerry JDE 4.6.0\bin;C:\Program Files\Java\jdk1.6.0_14\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\Credant\CMG Shield;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\DivX Shared\

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Cannot run program "javac": CreateProcess error=2,

JDK 1.4 is only necessary for pre-4.2 JDE's. I use JDK 1.5 and 1.6 on my system.

 

The particular error you are getting says that the javac compiler cannot be found.

 

Open a command window and type "javac". If the java compiler does not exeute, then you have an issue with your path as currently defined.

 

 

New Developer
Posts: 8
Registered: ‎05-31-2009
My Device: Not Specified

Re: Cannot run program "javac": CreateProcess error=2,

I already tried that an I can run javac from command prompt but not from BB JDE. Somehow BB is not able to find it. What else can I try there?
Highlighted
Developer
Posts: 984
Registered: ‎02-10-2009
My Device: Not Specified

Re: Cannot run program "javac": CreateProcess error=2,

I think you should start fresh.

 

Try the following:

------------------------ 

1. Uninstall jdk and JDE.

2. Install jdk 1.6 (i think your jdk version will do)

3. Install the BB JDE

4. Add the paths to your System Variables 

    a) C:\Program Files\Java\jdk....\bin

    b) C:\Program Files\Java\jre.....\bin

    c) C:\Program Files\Research In Motion\BlackBerry JDE .....\bin

5. Restart your pc.

 

Regards

Bikas
 

   

New Developer
Posts: 8
Registered: ‎05-31-2009
My Device: Not Specified

Re: Cannot run program "javac": CreateProcess error=2,

Thanks!!

 

Did not need to reinstall. Just reload worked in my case. I think I should have remembered that it is windows we are talking about and with windows restart generally works Smiley Happy

Developer
Posts: 984
Registered: ‎02-10-2009
My Device: Not Specified

Re: Cannot run program "javac": CreateProcess error=2,

If your problem solved then can you mark it so?

 

Regards

Bikas