Comment on Tutorial - Sample Java program shows how to write to COM port using Java. By Johanes



Comment Added by : Tebogo Modiselle

Comment Added at : 2014-10-31 08:47:09

Comment on Tutorial : Sample Java program shows how to write to COM port using Java. By Johanes
Hi
I can compile it
root$ javac -cp .:comm-2.0.jar SimpleCOMPortWriter.java but it fails on execution.

Please advise.



Exception in thread "main" java.lang.NoClassDefFoundError: javax/comm/PortInUseException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getMethod0(Class.java:2774)
at java.lang.Class.getMethod(Class.java:1663)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: javax.comm.PortInUseException
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 6 more


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Programs are so good..!
i wish to say one t

View Tutorial          By: Shashikumar Misal at 2012-09-01 20:35:47

2. Hi professional,
I tried the above code but

View Tutorial          By: Srinivas at 2008-05-05 23:32:13

3. I discover unlimited calendar.this calendar use of
View Tutorial          By: Lalit Kumbhani at 2011-12-31 16:02:06

4. need to be explained more
View Tutorial          By: parul at 2011-06-30 08:34:29

5. hi,
when i run the code i got the exception

View Tutorial          By: arjun at 2014-09-18 10:25:18

6. tnx
View Tutorial          By: arion at 2011-06-03 01:24:30

7. Muchas gracias por compartir informacion. :)
View Tutorial          By: Anonymous at 2009-05-21 08:48:47

8. Gracias, it worked.
View Tutorial          By: Eduardo at 2009-09-09 12:16:30

9. A big thanks to Ramlak for the detailed and crisp
View Tutorial          By: Chidanand Gangur at 2009-08-27 06:02:16

10. FYI, if you're using NetBeans, the input file shou
View Tutorial          By: pberg at 2013-03-28 17:00:16