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. hello sir i want to know how to run this pogram as
View Tutorial          By: Pranjay at 2009-01-07 03:33:45

2. Simple Example. Understood. Thanx.
In aksha

View Tutorial          By: Amila Nadanda at 2011-07-28 06:21:05

3. Thanks a lot......Plz help me to execute these fil
View Tutorial          By: Sanjana at 2013-01-26 10:15:12

4. Oh! Emiley, thank you very much! There are two lo
View Tutorial          By: Alexey at 2009-04-09 14:17:31

5. U should give the output also.. then only it will
View Tutorial          By: Mohamed Younus at 2011-07-07 10:13:54

6. Very nice tutorial........
View Tutorial          By: Santosh Saha at 2010-04-11 05:58:51

7. Best Example for Inheritance. Thank lot!

View Tutorial          By: Periyasamy C Chennai at 2010-07-09 01:35:30

8. how to pass user input string (like a user entered
View Tutorial          By: saif at 2012-12-04 19:51:26

9. great.....
View Tutorial          By: rashid at 2009-12-07 03:22:46

10. Hi lolz,
In order for this code to work, yo

View Tutorial          By: Vijay at 2008-12-10 19:22:04