I am using javax.comm package to achieve serial communication in java. I did the following:
1. put comm.jar in jdk/lib and jre/lib
2. put javax.comm.properties in jdk/lib and jre/lib
3. put win32com.dll in jdk/bin and jre/bin
I put my java program in jdk/bin directory and compiled it, its compiling and running properly. Its able to read from and write to a serial port and communicate with a device attached to that port.
But when i put the same program in another directory (my directory of java programs), it compiles fine but shows the following exception when run:
Exception in thread "main" java.lang.NullPointerException
I am working on Windows 2000, I have added the path of my java programs directory in CLASSPATH env variable, i really dont know why this exception is occuring, the same program is running perfectly in the jdk/bin directory.
Can anyone please help me out, this is very important.