title: Java: Using RxTx Libararies
body: <p>I am new to Java , and trying to write a serial communication application.</p>
  
  <p>I am using Windows 7 (32 bit)</p>
  
  <pre><code>D:\Glaswegian\Java\RXTX\Test&gt;java -version
  java version "1.7.0_13"
  Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
  Java HotSpot(TM) Client VM (build 23.7-b01, mixed mode, sharing)
  
  D:\Glaswegian\Java\RXTX\Test&gt;
  
  
  
  D:\Glaswegian\Java\RXTX\Test&gt;javac -version
  javac 1.7.0_07
  
  D:\Glaswegian\Java\RXTX\Test&gt;PATH
  PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
  \WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C
  :\Program Files\MATLAB\R2009a\bin;C:\Program Files\MATLAB\R2009a\bin\win32;C:\Pr
  ogram Files\Java\jdk1.7.0_07\bin;C:\Program Files\Java\jre7\bin;C:\Program Files
  \Java\jre7\lib\ext
  
  D:\Glaswegian\Java\RXTX\Test&gt;
  </code></pre>
  
  <p>I downloaded the RxTx</p>
  
  <p><a href="http://henrypoon.wordpress.com/2010/12/25/installing-rxtx-for-serial-communication-with-java/" rel="nofollow noreferrer">http://henrypoon.wordpress.com/2010/12/25/installing-rxtx-for-serial-communication-with-java/</a>
  <a href="http://rxtx.qbang.org/wiki/index.php/Using_RXTX" rel="nofollow noreferrer">http://rxtx.qbang.org/wiki/index.php/Using_RXTX</a></p>
  
  <p>As mentioned in above link, unzipped rxtx-2.1-7-bins-r2.
  copied rxtxSerial.dll to  C:\Program Files\Java\jre7\bin
  copied RXTXcomm.jar to C:\Program Files\Java\jre7\lib\ext</p>
  
  <p>I am just trying to run this code:</p>
  
  <pre><code>import gnu.io.*;
  
  public class RxTxComm{
      public static void main(String[] args)
      {}
  
      }
  </code></pre>
  
  <p>I am getting below Error.</p>
  
  <pre><code>D:\Glaswegian\Java\RXTX\Test&gt;dir
   Volume in drive D has no label.
   Volume Serial Number is C643-EE74
  
   Directory of D:\Glaswegian\Java\RXTX\Test
  
  07/02/2013  18:09    &lt;DIR&gt;          .
  07/02/2013  18:09    &lt;DIR&gt;          ..
  07/02/2013  17:45                94 RxTxComm.java
                 1 File(s)             94 bytes
                 2 Dir(s)  82,430,877,696 bytes free
  
  D:\Glaswegian\Java\RXTX\Test&gt;javac RxTxComm.java
  RxTxComm.java:1: error: package gnu.io does not exist
  import gnu.io.*;
  ^
  1 error
  
  D:\Glaswegian\Java\RXTX\Test&gt;
  </code></pre>
  
  <p>Referred this as well:
  <a href="https://stackoverflow.com/questions/9876924/javac-classpath-not-doing-the-trick">javac -classpath not doing the trick</a></p>
  
  <p>What is wrong?</p>