I'm working on a project which uses RXTX. I export it as an exacutable jar and it is in a folder like:
MainFolder
- lib
- RXTXcomm.jar
- ... more jars
- logs
- config.properties
- App.jar <-- Executable jar
In my computer (Windows 8.1) works perfectly, but it has to work on others (Windows 7) too. Where the program stops in at this method:
public void getPortIdentifiers() {
if(testMode) {
// TODO puertos.elements();
} else {
if(Controller.debug) logger.info("Obteniendo identificadores... ");
//identificadores = CommPortIdentifier.getPortIdentifiers();
for(int i=0; i<15; i++) {
String commPort = "COM"+i;
try {
CommPortIdentifier portId = CommPortIdentifier.getPortIdentifier(commPort);
logger.info("Puerto {} OK", commPort);
} catch (NoSuchPortException e) {
logger.error("Puerto {} FAIL", commPort);
}
}
if(Controller.debug) logger.info("... Listo!");
}
}
The program stoped at CommPortIdentifier.getPortIdentifiers()
, reading this question made me try with the for listing all posible ports. But at my log I've allways the same:
...
2015-05-14 12:56:59 [INFO ] Controller - Cargando los puertos
2015-05-14 12:56:59 [INFO ] CommunicationManager - Obteniendo identificadores...
At the question before, darkhelmet said that the problem was solved rebuilding it on Windows 7. But mine has to work on Windows 8 and Windows 7, must I have two workspaces one in each?