2015-05-14 90 views
0

我正在使用RXTX的項目。我出口它作爲一個exacutable罐子,這是一個文件夾中,如:Windows 7中RXTX的問題,但不是Windows 8中的問題

MainFolder 
- lib 
    - RXTXcomm.jar 
    - ... more jars 
- logs 
- config.properties 
- App.jar    <-- Executable jar 

在我的計算機(Windows 8.1)完美的作品,但它有別人(Windows 7)中工作過。凡參加本計劃方法可以停止在:

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!"); 
    } 
} 

程序採空的CommPortIdentifier.getPortIdentifiers(),讀了這個問題http://ow.ly/MWhh0讓我與嘗試列出所有更多鈔票端口。但在我的日誌我有百達相同:

...

2015年5月14日12時56分59秒] [INFO控制器 - Cargando洛杉磯puertos

2015-05- 14 12:56:59 [信息] CommunicationManager - Obteniendo辨識器...

就是這樣。

在之前的問題中,@ darkhelmet說問題已經解決,在Windows 7上重建它。但是我必須在Windows 8和Windows 7上工作,每個工作區必須有兩個工作空間嗎?

謝謝大家!我希望你能幫助我!

回答

0

最後我可以在其他的Windows 8上測試它,但它也沒有工作。有了這個W8我有兩個問題 1.其他Java版本。 2.沒有rxtxSerial64.dll。

,使其與更多的Java版本兼容我重建我與JDK6項目(以防萬一:d)。

而對於第二個問題,我只是把rxtxSerial.dll和rxtxSerial64.dll的文件夾,在我的App.jar的水平。

隨着Windows7電腦的問題只是第二次,因爲這兩個計算機具有相同的JRE版本。

我希望它可以幫助別人