J
jeroen
Hi,
For a project at school I need to read data from port COM2. I used som
examples from internet and created a project on it. Running the app it
looks like there is no COM port available.
This statment retuns null
System.out.println((CommPortIdentifier)portList.nextElement()); Tried
everything but something is missing.
selection of the code:
============================================
package talk2com;
import javax.comm.*;
import java.io.*;
import java.util.Enumeration;
public class Talk2Com {
//Construct the application
public Talk2Com(){
}
public static void main(String[] args) throws NoSuchPortException {
Enumeration portList = CommPortIdentifier.getPortIdentifiers();
System.out.println((CommPortIdentifier)portList.nextElement());
}
===================================================================
Thanks Jeroen
(e-mail address removed)
For a project at school I need to read data from port COM2. I used som
examples from internet and created a project on it. Running the app it
looks like there is no COM port available.
This statment retuns null
System.out.println((CommPortIdentifier)portList.nextElement()); Tried
everything but something is missing.
selection of the code:
============================================
package talk2com;
import javax.comm.*;
import java.io.*;
import java.util.Enumeration;
public class Talk2Com {
//Construct the application
public Talk2Com(){
}
public static void main(String[] args) throws NoSuchPortException {
Enumeration portList = CommPortIdentifier.getPortIdentifiers();
System.out.println((CommPortIdentifier)portList.nextElement());
}
===================================================================
Thanks Jeroen
(e-mail address removed)