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
Highlighted
Developer
Posts: 445
Registered: ‎07-15-2008
My Device: Not Specified
Accepted Solution

Error when Compiling

Hello,

when I try to compile any project in the 4.3, 4.5 or 4.6 JDK, it gives me this error:

 

I/O Error: Cannot run program "javac": CreateProcess error=2,

 

What do I do?

 

Thank you.

 

 

If your question was answered, please accept it as a sollution and / or give Kudos ;-)
______________________________
Use the Search Field first! Maybe the question you want to ask already exists!
New Developer
Posts: 54
Registered: ‎10-07-2008
My Device: Not Specified

Re: Error when Compiling

Check your enviroment variables to be pointed to your working SDK properly

 

Hope it helps

 

Regards!

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

Re: Error when Compiling

Arthur is correct - open a command line window and type "javac". If it does not run the java compiler, then you'll need to add the bin directory of your JDK to the system environment variable "PATH".
Developer
Posts: 445
Registered: ‎07-15-2008
My Device: Not Specified

Re: Error when Compiling

Thanks you two for helping me.

 

It does not find the 'javac'.

Now how do I add the bin-directory of the JDK to the system environment?

 

If your question was answered, please accept it as a sollution and / or give Kudos ;-)
______________________________
Use the Search Field first! Maybe the question you want to ask already exists!
Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Error when Compiling

The path to your Java compiler probably looks something like this:

 

C:\Program Files\Java\jdk1.5.0_16\bin

 

...your mileage may vary. You'll need to locate the JDK or you'll need to install it if it is not there.

 

To modify your Windows PATH variable:

 

Control Panel / System / Advanced / Environment Variables

 

In the "System Variables" section, locate "PATH", and press "EDIT". You want to have already copied the path info into the clipboard so that you can go to the end of the path and paste it in. Don't forget to place a semicolon between the last path defined and your new info. Be carefull not to overwrite stuff already defined in the path.