I\'m beginner in Java. I\'m reading data from device through serial port. I\'m getting data for every one minute, but first reading is coming half, after that data is coming
Try flushing the input buffer of the port before doing your read. Otherwise, if the sending end has sent data during your program's startup (or closely before, that might be up to the operating system), you will get old buffered data.
Also, if possible, consider adding message framing to the protocol, so you can detect when you have read something that is not, in fact, a complete message, and discard it. This is often very helpful with these kinds of issues.