Wiki

Clone wiki

javarosa / Netbeans

Steps to install the JavaRosa in NetBeans are as follows –

1. Install Netbeans module for J2ME Polish. For more details on How to install Netbeans module for J2ME polish please refer to the Link -

http://www.j2mepolish.org/cms/leftsection/documentation/installation/ide-integration/netbeans/installation.html

2. Start the NetBeans, select “File > new project” and select the project categories as “mobile” and project type as “J2ME Polish Project”. Now click Next.

3. On the next screen specify name of the project, Location of the Project and J2ME Polish Location. Now click Next.

4. In this screen select the target device, configuration, profiles and required libraries. (Ex. Configuration – CLDC/1.1, Device – Sony-Ericsson/W810i) and click Next.

5. In this screen, specify the project properties. Select Activate J2ME Polish GUI, select blank template, and specify the Emulator platform and click Next.

6. Project is created after above step. Now Right click on the project folder and select “New > Folder” and create a folder with name “source” and then paste the “src” folder from SVN under this “source” folder. Now the overall structure is as shown in the figure.

Image(wiki:Netbeans:Source.jpg)

7. Now right click on the main project and select properties. In the properties dialog box, uncheck option - Use values from “DefaultConfiguration” - in all the categories and then select the appropriate emulator platform, select the device, device configuration, and device profile.

8. Select the Midlet name in the “Midlets” category.

9. In the “Libraries and Resources” category add following JARS from the “J2ME- Polish home > lib” directory. a. C:\Program Files\J2ME-Polish\lib\ant.jar b. C:\Program Files\J2ME-Polish\lib\enough-j2mepolish-client.jar

10. In the Obfuscating category set the Obfuscation level to the High.

11. Add the files (i.e. messages_afr.txt, messages_en.txt, polish.css) from svn resources directory to NetBeans project’s “resourses > base” directory (Which is inside the resources directory). the structure is as shown in the figure

Image(wiki:Netbeans:Resource.jpg)

12. The project is ready to run or debug. It can be debug by setting the breakpoints.

13. To set a break point you go to the lines of code that you wish to set it on and then click on the bluish border on the left. This will put a breakpoint on this line.

14. Now click on debug main project. It can be found in the run menu or as a button on the tool bar.

15. You may notice that the project will stop and the line with your breakpoint will become green. This means that this is the line that will be executed next. You can notice we have access to the contents of our local variables and other things.

Updated