I've installed the Java Communication API because I want to make a
program that communicate with the Serial Port.
I've tried one of the sample program in the Java Communication API
(SerialDemo)
When I try to call the method main() I get the following message "Caught
java.lang.NullPointerException: name can't be null while loading driver
com.sun.comm.Win32Driver" and no ports are detected.
If I also try an abstract method of one of the class of Java
Communication API, CommPortIdentifier.getPortIdentifiers(), with
Tools/Use Library Class... I receive the same error .
If I run the program from the consolle typing "java SerialDemo"
everything is ok, I mean that I don't get any error and all the serial
ports are detected and everything is really OK.
I give you other useful informations:
Windows95;
JDK1.4.0_01;
Bluej 1.3.5;
C:\j2sdk1.4.0_01;
C:\Programmi\BlueJ;
Thanks to anyone who will help me.
--
Mr.Cube - 20 Mar 2004 09:35 GMT
> When I try to call the method main() I get the following message "Caught
> java.lang.NullPointerException: name can't be null while loading driver
> com.sun.comm.Win32Driver" and no ports are detected.
> If I also try an abstract method of one of the class of Java
> Communication API, CommPortIdentifier.getPortIdentifiers(), with
> Tools/Use Library Class... I receive the same error .
I remember that there is a newer version of the javacode of the Java
Communication API in the download for solaris.
Try might try this library.
So download JavaComm for Solaris. Find the jar-file. Copy that jar-file
in JavaComm for windows and see if that works.
Kees.