Excluding files from the compilation
To exclude files or folders matching a specific pattern from the java compilation, set the ant property spot.javac.exclude.src, either on the command line with
For example, to exclude all source files in all “unittests” folders, use:
spot.javac.exclude.src=**/unittests/*
Manifest and resources
The file MANIFEST.MF in the
A typical manifest might contain:
SomeProperty: some value
The syntax of each line is:
The most important line here is the one with the property name
The application can access properties using:
myMidlet.getAppProperty("SomeProperty");
All files within the resources directory are available to the application at runtime. To access a resource file:
InputStream is = getClass().getResourceAsStream("/res1.txt");
This accesses the file named “res1.txt” that resides at the top level with the resources directory.
Other user properties
For properties that are not specific to the application you should instead use either
•persistent System properties (see section Persistent properties) for
•properties in the library manifest (see section Library manifest properties
•Each library extension must contain a file named
1The Squawk VM is the Java virtual machine that runs on the Sun SPOT. For more details, go to http://research.sun.com/projects/squawk/.
13