Project Properties

To inspect or alter an MTJ project properties, open the Properties dialog via the Project / Properties menu of the workbench.

The MTJ portion of the of the project properties has four pages:

1. Mobile Tools for Java page
2. MIDlet Suite Signing page
3. Obfuscation page
4. Packaging page
5. Preverification page

# Mobile Tools for Java page

Select the Mobile Tools for Java category from the left pane of the properties dialog. The signing properties page for MTJ looks like the following:

Property items:

Item | Contents

Device

The Device setting controls both which particular device the project is compiled against, and also the default device used when launching the midlets in the project.

When this setting changes, the contents of your project are automatically recompiled. Thus, if you build a project using the MIDP 2.0 platform and then change to a MIDP 1.0 platform definition, your project may no longer compile because of references to classes, methods or constants not present in the MIDP 1.0 definition.

JAD/JAR file name | The default JAD/JAR file names are based on the project name, if you want to configure them to your own names, you can set them here.

# MIDlet Suite Signing page

Select the MIDlet Suite Signing sub-category from the left pane of the properties dialog to display signing properties for the project. The project properties page for MTJ looks like the following:

Property items:

Sign project | Select this option to enable signing for this project. Note that, if you do this, you will, at minimum, need to specify a Keystore File and the appropriate Key Alias.
Keystore File | This setting specifies the keystore file that contains the private key used to sign the MIDlet suite and the certificate used to verify the signature.
Key Alias | The Key Alias identifies the particular key within the keystore that is to be used.
Prompt for password when required | If you select this option, MTJ will prompt you for the keystore password and key password when it is time to retrieve information from the keystore. Note that MTJ will then save this password information in memory so that you do not need to provide it again during this session with Eclipse.

Save passwords in workspace keyring

If you select this option, enter the keystore password and the key password in the spaces provided. MTJ will save these passwords inside your keyring file. By default, this file is located in [workspace>]\.metadata\.plugins\org.eclipse.pde.core\eASEE\org.eclipse.core.runtime\.keyring, although you can specify a different file using Eclipse's -keyring command line argument.

Save passwords as part of project | If you select this option, enter the keystore password and the key password in the spaces provided. MTJ will save these passwords in encrypted form in the .mtj file that is part of your project.
Crypto Provider | If you are using a non-standard cryptographic provider, place the provider ID in this area. If you are using the standard system provider, leave this space blank.
Keystore Type | If you are using a non-standard keystore format, place the keystore format ID here. If you are using the standard system keystore type, leave this space blank.

Verify Settings

Pressing this button will cause MTJ to attempt to retrieve the key and certificate from the keystore, and check it to make sure that it is of the correct type. If this test succeeds, the key should be suitable for MIDlet suite signing. If one or more of the parameters you have entered is incorrect, you will get an appropriate error message. It is generally advisable to make sure that the settings all verify before attempting to deploy a project with signing.

For more information about MIDlet suite signing, click here.

# Obfuscation page

Select the Obfuscation sub-category from the left pane of the properties dialog to display project-specific obfuscation properties. The obfuscation properties page looks like the following:

Property items:

Item | Contents
Enable project specific settings | If this box is not checked, MTJ will use common obfuscation settings on the global Obfuscation Preferences page. If this box is checked, the settings on this page will be used instead of the global settings.

See the description of the Obfuscation Preferences page for details on the remainder of the items on this page.

# Packaging page

Select the Packaging sub-category from the left pane of the properties dialog to display project-specific packaging properties. The packaging properties page looks like the following:

Property items:

Item | Contents
Enable project specific settings | If this box is not checked, MTJ will use common obfuscation settings on the global Packaging Preferences page. If this box is checked, the settings on this page will be used instead of the global settings.

See the description of the Packaging Preferences page for details on the remainder of the items on this page.

# Preverification page

Select the Preverification sub-category from the left pane of the properties dialog to display project-specific preverification properties. The preverification properties page looks like the following:

There are two fundamental issues that one controls with this dialog:

1. Whether to preverify for CLDC 1.0 or CLDC 1.1.
2. Whether to use the external wireless toolkit preverifier or the new internal preverifier.

Property items:

Item | Contents
Enable project specific settings | If this box is not checked, MTJ will use common preverification settings on the global Preverification Preferences page. If this box is checked, the settings on this page will be used instead of the global settings.
Use JAD file settings | If you use this option, MTJ will consult the JAD file to find out whether it should preverify for CLDC 1.0 or CLDC 1.1.
Use project platform definition configuration | If you use this option, MTJ will preverify for CLDC 1.0 or CLDC 1.1 depending on which CLDC version the platform selected for this project supports.
Use specific configuration | If you select this option, you can use the pull-down list to explicitly select CLDC 1.0 or CLDC 1.1 preverification.

Use built-in preverifier

MTJ includes a native Java implementation of a preverifier. If you check this option, this new preverifier will be used instead of the external preverifier included with the Wireless Toolkit.

NOTE: The internal preverifier is still in a beta state of developement, and is not guaranteed under all circumstances. The internal preverifier should not yet be used for production deployments.

That being said, the internal preverifier does provide better feedback on any preverification errors than most of the external preverifiers. The MTJ developers would greatly appreciate feedback on the functionality of the preverifier.