In application code, you can use Connector.open(“comm:COM1“) to open a port on the device.
On Windows, you can open a serial port such as COM1 or COM2.
Mac hardware does not have serial ports. Java ME SDK emulates a serial port named COM1 for each default device. When your application connects to COM1, you can emulate interaction with the serial port by reading from and writing to the serial file:/Users/uname/Library/Application Support/javame-sdk/3.0/work/device/serial
The serial file is a symbolic link to a pseudo terminal that is virtually connected to the device under COM1. When the emulator encounters the call to open the port the serial file is instantiated. When the connection is closed the serial file is removed.