BlackBerry Gotcha #00001

Can’t Find javac…

The first post of the BlackBerry Gotchas category starts where you might start off if you venture into BlackBerry development.  It has to do with getting the JDE properly installed. 

The overall process for installing the JDE is straight forward, just download and follow the installation instructions that follow.  However, after you create the de facto “Hello, World!” application and you attempt to compile, you may run into the following error:

I/O Error: Cannot run program "javac": CreateProcess error=2, The system cannot find the file specified
Error while building project

Not a great way to start, but not a huge problem to fix.  Most modern day IDEs now ask for the installation location of your Java Development Kit (JDK) during the installation process.  However, the JDE relies on the system to inform it of where the JDK is located.  This means that you need to make sure that you specify your JDK’s bin directory in your PATH variable.  You can do this permanently by opening up the “Systems Properties” dialog and under the “Advanced” tab clicking on the “Environment Variables…” button.  Now find the PATH variable in the “Systems Variables” list and add <PATH TO JDK HOME>/bin to is.

Once your done with that, reload your JDE and compiling should commence with only issue that are of your own doing.

Leave a comment