PreviousNext

Create new source files in a project

The .java source file name must match the name of the public class or interface in the file. It must also be located in a folder structure that matches its package name.

For example, if the workspace file is C:\name\ws.jdw and it contains a com.mycompany.MyClass class, then you must name the project (.java) source file MyClass.java, and store it in C:\name\com\mycompany\MyClass.java.

Note: If you try to build a project with source files that do not conform to these rules, a BlackBerry® IDE error message appears.

    1. On the Project menu, click Create New File in Project.
    2. In the Source file name field, type a file name without the .java file name extension.
    3. In the Create source file in this directory field, type a folder name.
    4. Click OK.

      Note: If you turn on source control integration, the BlackBerry IDE displays a dialog box with a "Add file to source control?" message.

Related topic


   BlackBerry