>> May be that works:
>> RandomAccessFile raf = new RandomAccessFile("COM10", "rw");
[quoted text clipped - 9 lines]
> any port on my computer, but I hope I'll solve that problem in next few
> days.
If you are using Winblows, put your files here and run the test code below.
JDK/jre/lib/ext comm.jar
JRE/lib/ext comm.jar
JRE/lib javax.comm.properties
JRE/bin win32com.dll
import java.io.*;
import java.util.*;
import javax.comm.*;
public class Ports {
public static void main(String[] args) {
Enumeration e = CommPortIdentifier.getPortIdentifiers();
while (e.hasMoreElements()) {
CommPortIdentifier cpi =
(CommPortIdentifier) e.nextElement();
System.out.println(cpi.getName());
}
}
}

Signature
Knute Johnson
email s/nospam/knute/
hr.org.fer - 15 Nov 2006 11:29 GMT
On Nov 15, 1:02 am, Knute Johnson <nos...@rabbitbrush.frazmtn.com>
wrote:
> JDK/jre/lib/ext comm.jar
>
> JRE/lib/ext comm.jar
> JRE/lib javax.comm.properties
> JRE/bin win32com.dll
This was the problem. I did not put files in JRE folder, but instead I
had put them all in JDK (lib and bin) directory. The result was that I
was able to compile source code (I had put comm.jar as project
dependency) but at runtime non of the ports were accessible. Now
everything works fine and I can access all of my ports.
> import java.io.*;
> import java.util.*;
[quoted text clipped - 12 lines]
>
> }
Yes, this compiles and runs OK now. Thanks for the assistance.