Defining new Security Permission

In this section, you will be learning how to extend MTJ signing feature in order do add new security permissions into it.

Creating new security permissions is very simple, extend the org.eclipse.mtj.core.securitypermission extension point in your plug-in project.

You must specify the classes that requires permissions to be declared on the MIDlet-permissions JAD attribute.For this example, we'll use classes from JSR-75 (FileConnection API)

JSR-75 (FileConnection API) Classes

For each class element, specify the list of permissions that must be declared on the MIDlet-permissions JAD attribute when a instance of this class was found on the user source code.

JSR-75 (FileConnection API) Permissions

This list of permissions will be accessible in the jad editor on the signing tab.

JSR-75 (FileConnection API) Permissions