Hello I have seen this Why am I getting a Java NoSuchPortException when the port exists? post but It's not very clear to me!!
In device manager it shows COM3 is exist and I can connect it through putty, but this piece of code is getting this error/exception.
try {
portId = CommPortIdentifier.getPortIdentifier("COM3");
} catch (NoSuchPortException ex) {
System.out.println(ex);
}
try {
serialPort = (SerialPort)portId.open("S2CFrameWork", 5000);
} catch (PortInUseException e) {
System.out.println(e);
}
this simple code thrown a javax.comm.NoSuchPortException, I have also tried this with using Enumeration to get the list of avilable port but still it shows exception. Can anyone solve this issue?