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. public void playSound(String filename) {

View Tutorial          By: Rowan at 2014-07-17 10:26:02

2. Gooooooooooodd !!!
View Tutorial          By: Digvijoyee at 2010-08-30 22:11:31

3. any help please I'm getting this exception

View Tutorial          By: Bull at 2012-01-02 17:22:18

4. Hay can you send me complete code to make connecti
View Tutorial          By: 9COOL at 2010-02-22 08:10:47

5. it giving me error in following statment (using Li
View Tutorial          By: Priyadarsan at 2007-11-27 22:31:56

6. BEST COMMENT EVER:
"Reading the above

View Tutorial          By: Mr.X at 2013-10-02 16:31:42

7. Thanks
View Tutorial          By: Bad Programmer at 2011-11-23 10:43:49

8. s1==s2 is not true. its false. run the program and
View Tutorial          By: arpita at 2009-05-18 23:50:11

9. Nice tutorial, I got how it's done, but the differ
View Tutorial          By: FriendlyNoob at 2015-07-20 17:27:08

10. ya,i changed tht to GSM modem but stil there is a
View Tutorial          By: rajesh at 2008-12-15 01:56:35