Description: package aa
import javax.comm.*
import java.util.Properties
import java.util.Enumeration
import org.omg.Dynamic.*
import java.awt.Choice
public class serialcomm
{
void listPortChoices() {
SerialParameters parameters=new SerialParameters()
Choice portChoice=new Choice()
CommPortIdentifier portId
Enumeration en = CommPortIdentifier.getPortIdentifiers()
while (en.hasMoreElements()) {
portId = (CommPortIdentifier) en.nextElement()
if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
System.out.println(portId.getName())
}
}
portChoice.select(parameters.getPortName())
}
public static void main(String args[]) {
serialcomm scomm=new serialcomm()
scomm.listPortChoices()
}
}
class SerialParameters {
private String portName
private int baudRate
private int flowControlIn
pri
To Search:
File list (Check if you may need any files):
SerialDemo.java