In Unix like operating systems, we can access serial ports through files such as /dev/ttyUSB0
or something. And according to this question, filenames such as COM1:
can be used to access the serial ports. What is the java alternative for such file names? I don't want to use Serial Communication
liberaries.
Edit
What I want my code to look like is this.
String INPUT_PORT_FILE_NAME = linux?"/dev/ttyUSB0":"<File name of comport>"
File in = new File(INPUT_PORT_FILE_NAME)
What I want is the widows alternative to a device file.
EDIT I am on a linux machine, and I want to enable my code to be ported easily!