Time for action - installing the Java Development Kit (JDK)
The
installation starts off with the End User License Agreement for the
Java Development Kit. If you enjoy reading legalese, feel free to read
through it, but if you are like most people, just click on the Accept button and go on.
The
next screen shows several components that could be installed. All of
the components are enabled by default, but you really need only the
public JRE and the Development Tools. The Source Code can help with debugging at times, but in all honesty you probably won't ever use it. Demos and Samples can be helpful for understanding Java in general, but won't have any of the BlackBerry-specific topics in it. The Java DB definitely won't be used on any BlackBerry applications.
After
this, the setup program does a lot of work before stopping at another
screen asking where to put the install files. I recommend accepting the
defaults.
This
package is also installing the JRE, which does integrate with browsers,
so you might get a warning screen if you have the browser window still
open from where you downloaded the JDK. If this is the case, exit this,
or any other applications listed, and continue with the setup. If you
check the checkbox, the setup program will shut the applications down
for you.
From this point on, the installer does its thing and finishes the install. Look Microsoft, no reboot required!
What just happened?
In this step we installed the Java Development Kit
(JDK). The JDK is used for all Java development, but an essential part
of the BlackBerry development environment includes the Java compiler.
This particular package that we picked will also install the Java Runtime Edition (JRE). The JRE is required to run any Java application and includes the Java Virtual Machine (JVM), or runtime engine.
Introducing the BlackBerry Developer Zone
Before getting focused
on creating applications, I think it's wise to present the official
source for information, support, downloads, and forums for
BlackBerry-the BlackBerry Developer Zone at http://www.blackberrydeveloper.com.
Here you can find the official documentation, a knowledge base full of
great articles, support forums, and much more. Specifically, here are
some great resources to go for more information in the future:
You will need to
register for the BlackBerry Developer Community in order to download any
of the tools, SDK, simulators, or in some cases, documentation. So,
let's head over to https://www.blackberry.com/CorpDevZone/register.do and get that done. Registration is free.
The registration process is
typical and straightforward. The e-mail address you give on this page
will serve as your login ID at the website from this point forward.
After supplying the information on the registration page, the system
will send an e-mail to the e-mail address given with a link that you
must click on to activate your account.
The e-mail should arrive
quickly, and once you click on the link to activate your account you're
ready to actually download the files and get started!
Downloading and installing Eclipse
Now that you've got
Java installed, let's start installing Eclipse! There are two different
ways to install the software. You can download Eclipse directly from the
Eclipse website at http://www.eclipse.org/downloads/packages/release/ganymede/sr2
or you can download a version from the BlackBerry Developer Zone, which
is already pre-bundled with the BlackBerry JDE component plugin. You
can download it from http://na.blackberry.com/eng/developers/javaappdev/javaeclipseplug.jsp.
I
recommend using the pre-bundled version of Eclipse. This pre-bundled
version includes version 4.5 of the SDK, but more importantly it is much
easier to install than installing Eclipse and the component pack
separately.
Time for action - downloading Eclipse with the JDE plugin
On the BlackBerry website the pre-bundled version is called the Full Installer and has a large Download Now button, as shown in the following screenshot. Click on the Download Now button to get started.
When you click on the Download Now
button, you will be shown another registration page. I know you already
filled out all of that information, but you have to do it again, and
again, and again. It's rather annoying really. Be sure to change the
radio button at the bottom confirming that you are not lying to them
because it defaults to No and won't proceed until changed to Yes.
Next,
you will find one or two license agreements that you must accept
(depends on which version you download). After all that, you can finally
download the setup file.
What just happened?
The Eclipse Full
Installer includes both the BlackBerry 4.5 components as well as the
Eclipse installation already integrated together. We chose to install
the Full Installer.
Notice that you can
download just the individual component package for each version of the
BlackBerry SDK from here as well. You don't need to install Eclipse over
and over for each different version of the SDK. Instead, you can
download just the component pack for only that version and add the
component pack to your Eclipse installation.
There is
a way to download and install the component packs directly within
Eclipse (which I think is easier), but we will do that later.