当前位置:编程学习 > JAVA >>

java程序检测不到串口


请各位大侠帮忙!!!我用这个简单的检测串口程序检测串口为什么检测不到任何串口啊,,
实际上是有串口的
package b_comm_number;

import   java.util.Enumeration; 

import   javax.comm.CommPortIdentifier; 

public   class   c_comm_number   { 

public   static   void   main(String[]   args)   { 
Enumeration en=CommPortIdentifier.getPortIdentifiers();
CommPortIdentifier port;
while(en.hasMoreElements())
{
port=(CommPortIdentifier) en.nextElement();

if(port.getPortType()==CommPortIdentifier.PORT_SERIAL)
{
System.out.println(port.getName());

}
}


}
}
--------------------编程问答-------------------- 参考: http://topic.csdn.net/u/20081205/20/f3ef2818-b64d-4400-b934-64ad828d36fc.html    --------------------编程问答-------------------- 恩恩,谢谢啦,我的确是配置错了,呵呵 --------------------编程问答-------------------- 我也是这种问题,可以说一下怎么配置吗???
补充:Java ,  Java SE
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,