How do i read from a device instead of a file?
Hello,
I am trying to read a line of gps data with java. Here is my situation: After I run a c program, it creates /dev/gps and then, when i type "cat /dev/gps", I can see many lines of longitude/latitudes. I have the following code, but it does not work. I first run my c program and then when i run the java class right after, but it just freezes and doesn't output anything? Any help would be great. Thanks!
RandomAccessFile in = null;
in = new RandomAccessFile("cat dev/gps", "r");
String line = in.readLine();//reads the first line of /dev/gps
System.out.println(line);
//NOTE: I also tried ("dev/gps", "r") instead and I get the same results.
thanks

