If you do make push registry entries for your application, make sure you also enter the appropriate permissions. See Chapter 6, “Security and MIDlet Signing,” for details.

3.5Project Directory Structure

Projects have a standard directory structure. The project itself is represented by a directory in {toolkit}\apps. For example, the demos project is contained in {toolkit}\apps\demos. Inside a project directory, the following directories are used:

TABLE 2

Project directory structure

 

 

 

Directory

 

Description

 

 

 

bin

 

The MIDlet suite descriptor and JAR are placed in this directory

 

 

when you package the project. This directory also contains the

 

 

unpackaged manifest information and might include an HTML file

 

 

that is used internally when you do Run via OTA.

classes

 

This directory is used by the toolkit to store compiled class files.

lib

 

Place a third-party library in this directory to include it in this

 

 

project.

res

 

Images, sounds, and other resource files go in this directory. They

 

 

are packaged into the root of the MIDlet suite JAR.

src

 

Place source files in this directory.

tmpclasses

This directory is used by the toolkit.

tmpsrc

 

This directory is used by the toolkit.

 

 

 

In addition, the project directory contains a project.properties file which contains information about the project.

If you want to remove temporary directories and files from the project, choose Project > Clean from the KToolbar menu.

3.6Using Third-Party Libraries

The J2ME Wireless Toolkit allows you to incorporate third-party libraries in your applications. Using third-party libraries can cut down on your development time by providing functionality you don’t wish to build yourself, but you should keep a close eye on the size of your MIDlet suite JAR.

Chapter 3 Working With Projects 25

Page 37
Image 37
Sun Microsystems J2ME manual Project Directory Structure, Using Third-Party Libraries, Project directory structure