~Setup of javax.comm api
843804Feb 20 2002 — edited Aug 17 2009Hi,
Can someone help me please, this is important. I've installed the javax.comm api onto my machine (Win98).
I've written this simple program that will return all the ports found on the pc to the screen
import javax.comm.*;
import java.util.*;
public class PortLister{
public static void main(String args[]){
Enumeration e = CommPortIdentifier.getPortIdentifiers();
while(e.hasMoreElements()){
System.out.println((CommPortIdentifier)e.nextElement());
}
}
}
The application compiles, but when i run it, it dosent seem to go into that while loop. Therefore it dosen't print out the ports on the system. Why is it returning null???
I've followed the installation instructions,
put win32com.dll into c:\jdk1.3.1_01\bin
put comm.jar into c:\jdk1.3.1_01\lib
put javax.comm.properties into c:\jdk1.3.1_01\lib
(it says "The javax.comm.properties file must be installed. If it is not, no ports will be found by the system." How do you install it? is putting it into the lib folder installing it?????)
my autoexec.bat looks as follows;
set CLASSPATH=c:\jdk1.3.1_01\lib\comm.jar;%CLASSPATH%
Whats going on? this is really starting to p/$$ me off so can someone pleeeeeease help,
thanks,
Joe