次のコードでは:
public void connect()
{
/*
String selectedPort = "COM1";
String selectedPort = (String)window.cboxPorts.getSelectedItem();
selectedPortIdentifier = (CommPortIdentifier)portMap.get(selectedPort);
*/
}
Eclipse は、selectedPort を解決できないと文句を言います。コメントの中を見ているのはなぜですか?