When you develop Java applications for the BlackBerry smartphone, you might want to exclude some files in the source folder from being compiled with the application code. A common example occurs when you are using source control, which often creates a subfolder in the project’s src folder. When you build the project, the source control subfolder may be included in the build, increasing the size of the .cod and .jar files.
BlackBerry Java Plug-in for Eclipse includes tools that allow you to specify which files and folders to include or exclude from the build.
There are two tasks you must complete to set up this feature.
Note: If you do not perform this task before the next task, errors will occur when you build the project.
Enable project-specific settings to allow for the exclusion rule changes to be enforced. This can be done by completing the following steps:
Right-click the project name.
From the context menu, select Properties.
In the left pane, select the Enable project specific setttings check box.
Apply the changes and then close the window.
Specify the files or folders to exclude. This can be done by specific files or folders or by using a rule to filter files or folders.
To specify files and folders, complete the following steps:
Below the main src folder of your project, right-click the Java source file of the package you want to exclude.
To exclude files or folders from all subsequent builds, select Build Path > Exclude.
To include files or folders from all subsequent builds, select Build Path > Include.
To create a rule to filter files and folders, complete the following steps: