# Device management

## Managing devices

## Install devices manually

## Edit a device definition

## Device definition properties

## Duplicate a device definition

## Example: Create a MIDP 1.0 device

# Device management

You can use the Device Management feature to specify and configure the devices that you want to use in Java® ME projects. MTJ can find devices automatically for software development kit (SDK) providers that support automatic device installation. If MTJ does not find devices automatically, you can add them manually.

Top

## Managing devices

The Device Management feature in MTJ provides significant control over the device definitions that are available to MIDlet Suites and device emulators.

The Device Management screen displays the devices that MTJ finds, either by manual or automatic Installation. You can edit, duplicate, and delete devices, and specify a default device. You can also install devices manually that MTJ did not find automatically. To use MTJ, you must configure at least one device.

To view the Device Management screen, click Window > Preferences, expand Java ME and click Device Management. Devices are grouped by SDK, and SDKs are grouped by provider.

Top

## Install devices manually

You can install devices manually if MTJ does not detect the devices automatically.

1. On the Device Management screen, click Manual Install.
2. In the Specify search directory field and click Browse.
3. Navigate to the location of a provider SDK and click OK.
   MTJ searches the directory and its subdirectories for devices.
4. In the Install column, select the check boxes of the devices that you want to install and click Finish.

Top

## Edit a device definition

MTJ can recognize many of the wireless toolkits (SDKs) that are available to developers. However, due to the many vendors and the various ways that SDKs are structured, the device definitions might not be accurate or might not be quite what you are looking for. To overcome this limitation, MTJ allows you to edit the device definitions.

The edit dialog box provides access to the device definition, including the emulator executable, launch command, and libraries for the device. When the edit dialog box opens, it is populated with the properties of the device that you selected.

1. On the Device Management screen, click the device that you want to edit.
2. Click Edit.

Top

## Device definition properties

#### Basic tab

The Basic tab displays many of the properties that make up the device definition. These properties work together to provide the environment that is necessary for MTJ, and care must be taken when making changes. You cannot change the device name or the group (SDK) name. For more information about configuring the properties available on this page, see Device Editor > Basic Tab.

#### Libraries tab

The Libraries tab allows you to select and configure the libraries that make up the device definition. You can use the controls on this page to add or remove functionality from a device. This tab is useful for restricting the available APIs to create a more generic project. For more information about configuring the properties on this page, see Device Editor > Libraries Tab.

#### Symbol Set tab

The Symbol Set tab displays the symbols that are defined by the selected device. Symbols can not be altered at this time.

Top

## Duplicate a device definition

You might find that a device definition does not provide the exact functionality that you want, and requires a few small changes. In this case, you can use the Duplicate feature to create an exact copy of a device definition. You can then change the duplicated device definition without changing the original device definition.

Note: It is not a requirement that you duplicate a device before you change the definition. If you make changes to a device definition and you would like to revert to the original definition, simply remove the device definition and re-install it.

1. On the Device Management screen, click the device that you want to duplicate.
2. Click Duplicate.
   A numbered copy appears in the list.
3. Click Edit.
4. Make the changes that you want to the device definition and click OK.

Top

## Example: Create a MIDP 1.0 device

An installed device might provide greater functionality than you require for testing. You can create and edit a device definition by using the Device Management feature. For example, you can create a new MIDP 1.0 device based on the DefaultColorPhone from the Sun® Java® wireless toolkit.

1. On the Device Management screen, duplicate the device that is closest to what you want.
2. Click the copy of the device definition and click Edit.
3. Click the Basics tab and alter the launch command template. Change: `-Xdevice:%device%` to `-Xdevice:DefaultColorPhone`.
4. Click the Libraries tab.
5. Click Add... to add cldcapi10.jar. It should automatically be recognized as CLDC 1.0.
6. Remove the original cldcapi11.jar.
7. Click Add... to add midpapi10.jar. It should automatically be recognized as MIDP 1.0.
8. Remove the original midpapi20.jar.
9. Press OK to commit the edits to the device.
10. Press OK on the Device Management screen.

Top