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



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. thanks! it helped!
View Tutorial          By: shgy at 2015-03-17 07:42:40

2. ei! its me again..i badly need you help coz we are
View Tutorial          By: anne226 at 2009-02-11 10:24:21

3. i m happy this programs thsk
View Tutorial          By: jai at 2011-05-09 14:20:35

4. java.lang.NoSuchMethodError: main

<

View Tutorial          By: mark at 2010-09-27 03:46:48

5. very useful...!
View Tutorial          By: mahesh at 2012-01-06 09:55:59

6. Nice example of System.arraycopy()function. Thank
View Tutorial          By: Rahul Raj at 2015-08-17 03:11:44

7. Hi,

I alos faced the same problem o

View Tutorial          By: prasanna kumar v at 2010-05-15 02:55:59

8. HI I've been gettin this problem in STEP 6...How d
View Tutorial          By: Omar_sito12 at 2010-02-22 08:46:18

9. can you give the program about the fast food by us
View Tutorial          By: grace at 2008-09-22 00:48:37

10. It's very very useful for me. thank you.
View Tutorial          By: thirumalai at 2009-01-28 03:25:25