To create a new NetBeans IDE project that uses the MCBO API, follow these steps.
In NetBeans IDE, choose New Project from the File menu.
Choose Project Screen.
Click Mobility->MIDP Application.
Click Next.
In the Name and Location screen:
In the Default Platform Selection Screen:
Add the mep_client_api.jar file to your Libraries & Resources for this project in order to call and have access to the MCBO API.
If you have not done so before, go to http://www.sun.com/software/products/mep/get.jsp and download the sjsmep-client-1_0_02-fcs.zip bundle.
Unzip the sjsmep-client-1_0_02-fcs.zip bundle (for example, under C:\).
In NetBeans IDE, right-click Project->Properties.
Click Libraries & Resources.
Click Add Jar/Zip.
Browse to the location of the unzipped bundle above the lib directory to add mep_client_api.jar.
For example, if you unzipped the bundle to the C:\ directory, the file name would be C:\sjsmep-client-1_0_02-fcs\lib\BlackBerry\mep_client_api.jar.
Click the Files Tab (next to the Projects tab) and open the project.properties file under the nbproject directory.
Edit the file.reference.mep_client_api.jar property to contain the fully qualified path name of the mep_client_api.jar file.
For a BlackBerry project, the pathname must be absolute, not relative.
For example, if you unzipped the bundle to the C:\ directory, edit the property setting to look like this:
file.reference.mep_client_api.jar=C:/sjsmep-client-1_0_02-fcs/lib/BlackBerry/mep_client_api.jar
Use forward slashes (/) instead of the usual Windows file separator.
Click the Files Tab and open the project's build.xml file. Immediately before the </project>tag at the end of the file, add the same code fragment you added in Step 9 of To Import the SecureMusicDB Sources into NetBeans IDE as a BlackBerry Project.
Create an .alx file for this project:
Click the Files tab.
Right-click your project and select New->Other.
In the Choose File Type screen, click Other, then click Empty File.
Click Next.
Give the file the same name as your project name, with the .alx extension.
Click Finish.
Copy and paste into the file the content from Step g under Step 10 of To Import the SecureMusicDB Sources into NetBeans IDE as a BlackBerry Project, replacing myProject with your project name.
Save and close the file.
Copy the file mep_client_api.cod from the directory C:\sjsmep-client-1_0_02-fcs\lib\BlackBerry to the simulator directory of the BlackBerry JDE (for example, C:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\simulator).
Click the Projects tab, then right-click your project and select Clean & Build.
Right-click your project and select Run.
The BlackBerry Device Simulator appears.
When you select Run, NetBeans IDE automatically loads the application on the Simulator using the .jad and .jar files (not the .cod file). To load the application from the .cod file created, use the Load Java Program option in the Simulator.
Launch the MIDlet application.
At this point, you have a boilerplate application that says Hello World. You can now add code to implement and call the MCBO API classes and methods, and you can edit the MIDlet code to provide a user interface and to perform synchronizations.