I'm on windows 10 and i try to get all serial ports but my code just stop without error and even with a try catch i have no exception how i understand what just happend, here is my code :
public static void initialisePortsSerie() {
//Parcours et lance le traitement sur chaque port série
try {
System.out.println("Recherche des ports série");
SerialPort[] ports = SerialPort.getCommPorts();
System.out.println("Nombre de ports série détectés : " + ports.length);
if (ports.length == 0) {
return;
}
for (SerialPort port : ports) {
lecturePortUsb(port);
}
} catch (Exception e) {
System.out.println("Erreur lors de la recherche des ports série : " + e.getMessage());
}
}
I'm on windows 10 and i try to get all serial ports but my code just stop without error and even with a try catch i have no exception how i understand what just happend, here is my code :