Using RXTX In NetBeans

From Rxtx

(Difference between revisions)
Jump to: navigation, search
(Installing under JDK)
Line 12: Line 12:
== Installing under JDK ==
== Installing under JDK ==
-
If you have followed the installation method of copying files into "Java\jreXXX\lib\ext" and "Java\jreXXX\bin" and have the same problem descibed above, you should note that Netbeans installs its own JRE when it installs the JDK, so to fix this problem you should simply copy the .jar and the .dlls to "Java\jdkXXX\jre\lib\ext" and "Java\jdkXXX\jre\bin". It works like a charm.
+
If you have followed the installation method of copying files into "Java\jreXXX\lib\ext" and "Java\jreXXX\bin" and have the same problem descibed above, you should note that for using Netbeans you must have installed JDK first, wich in turn may have installed its own JRE, on that case to fix said problem you should simply copy the .jar and the .dlls to "Java\jdkXXX\jre\lib\ext" and "Java\jdkXXX\jre\bin". It works like a charm.

Revision as of 07:57, 7 December 2010

Installin in a project

Under Netbeans 5.5 on Windows, I needed to right-click Librariesunder Projects on the left hand side of the screen, and select Add JAR/Folder, picking the RXTXcomm.jar file. Only then did my "import gnu.io.*;" become a valid command. Also, I got a run-time error where it failed to load the rxtxSerial.DLL library because it couldn't find it. I needed to right-click the project name, select properties, select Run under categories, and add a VM Options: entry of

-Djava.library.path="C:/where-ever-you-stuck-rxtxSerial.DLL-file;%PATH%"

While I'm sure there is more than one way of adding the directory to your path, this worked for me. Note I did the default NetBeans 5.5/JDK 1.6.0 isntall accepting all the default options(ie clicking next until I got to finish), so I haven't modified my java paths or anything.

make sure you type "import gnu.io.*"


Installing under JDK

If you have followed the installation method of copying files into "Java\jreXXX\lib\ext" and "Java\jreXXX\bin" and have the same problem descibed above, you should note that for using Netbeans you must have installed JDK first, wich in turn may have installed its own JRE, on that case to fix said problem you should simply copy the .jar and the .dlls to "Java\jdkXXX\jre\lib\ext" and "Java\jdkXXX\jre\bin". It works like a charm.

Personal tools