I am writing a program to read and write from and to serial port of a system using Java in Netbeans IDE. I am working with Ubuntu 14.04 operating system. Actually I am a beginner in java programming. I have downloaded comm-linux_all-2.0.0.jar from oracle's home site and it is copied to workspace directory.
After all these things I imported the API using the command
import javax.comm.*;
But it shows the error "Package javax.comm does not exit."
What would be the problem, please help me to resolve the problem.
extract comm-linux_all-2.0.0.jar
the files
somewhere in the NetBeans directory.
Here we take the following directory. (you know the path on ubuntu)
\\NetBeans80\\extra\\modules
RXTXcomm.jar
comm.jar
Now open Netbeans : tools -> libraries
here : comm-linux_all-2.0.0
Add JAR/Folder
Libraries
Add Library ...
comm-linux_all-2.0.0
LibrarylibrxtxSerial.so
and librxtxParallel.so
to /usr/bin
folder.now you can use.
import javax.comm.*;
....
public class JustaClass {
....
You can check the pom.xml file.
I had the same problem (I am a rookie)
I didn't add the dependencies :
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
</dependency>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.