Installation BlackBerry SDK Steps:
http://docs.blackberry.com/en/developers/deliverables/16874/index.html?name=Tutorial+-+BlackBerry+Java+Plug-in+for+Eclipse1.1&language=English&userType=21&category=BlackBerry+Java+Plug-in+for+Eclipse&subCategory=
- Choose Help > Install New Software.
- Click Add.
- For Location, type http://www.blackberry.com/developers/jar/win/java.
- For Name, type BlackBerry Java Plug-in Update Site.
- Click OK.
- Select BlackBerry Java Plug-in and at least one BlackBerry SDK.
Choose the version of the BlackBerry SDK that is compatible with your intended target market.
Read more about choosing the right Blackberry SDK versions.
- Click Next.
- Review the items being installed, and then click Next.
- Review the license agreement, and then check I accept the terms of the license agreement if you agree.
- Click Finish to begin the installation.
- After the plug-in is updated, you'll be prompted to restart Eclipse.
Don't have Eclipse installed?
No
problem, you can download the full installer, which includes Eclipse
3.7, BlackBerry Plug-in for Eclipse 2.0.0 and the BlackBerry 7.1 SDK
conveniently packaged in a single installer.
1.Double click on the downloaded file to install it.
2.Click next to proceed the installation
3.Chose accept and click next.
4.
Chose the destination place where you want to install the eclipse and click next.
5.
If you do not want to create shortcut on desktop and programs means uncheck those check boxes and click next.
6.
Click Install.
7.
Click Done.
If you get this error message means you have to download the latest version of JRE and install and run the eclipse.
Your eclipse will start like this.
8.
Chose the destination folder for your workspace and click the check box to avoid this message on future use.
9.Your eclipse will opens like this.
Creating Hello World Project
Step 1
Click File -> New -> Blackberry Project
if there BlackBerry Project not present then let do it..
Click File -> New -> Other -> Blackberry folder ->Blackberry Project
Step 2
Enter your project name and click Finish.
Step 3
Create Package and Two java files into that package:
“MyApp.java” and “MyScreen.java”. Here “MyApp.java” is your main application class and “MyScreen.java” is your application screen class.
Step 4
Double click on the “MyApp.java” and replace the following code in it.
package mypackage;
import net.rim.device.api.ui.UiApplication;
public class MyApp extends UiApplication {
public MyApp() {
// TODO Auto-generated constructor stub
this.pushScreen(new MyScreen());
}
public static void main(String[] args) {
// TODO Auto-generated method stub
MyApptheApp = new MyApp(); //Create an instance of this class
theApp.enterEventDispatcher(); //attach an event Dispatcher
}
}
Double click on the “MyScreen.java” and replace the following code in it.
package mypackage;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.MainScreen;
public class MyScreen extends MainScreen {
public MyScreen() {
// TODO Auto-generated constructor stub
LabelField title = new LabelField("First Application",
LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);
setTitle(title);
add(new RichTextField("Hello World..! This is my first BB Application!\n _PRASHANT"));
add(new BasicEditField("Name:","")); //for editbox
}
//dialog box when close the app
public boolean onClose()
{
Dialog.alert("Goodbye!close it..?");
System.exit(0);
return true;
}
}
Step 5
Right click on the screen and select Run As BlackBerry Simulator
Step 6
Your blackberry simulator will open like this.
Step 7
Here click “All” and swipe or scroll down to your “
HelloBlackBerry” application and click on it to open.
Step 8
You can see the like this: