I have a similar problem to the following link. How to change baud rate without closing the connection?. But i use C# in stead of java. I am beginning with baud rate 300. Then a
In my experience baud rate switches require closing and reopening the serial port hardware: I would suggest trying that. Send the baud rate switch command then close the port, set the baud rate and then re-open the port. Opening/closing the port should be transparent to the device on the other side (unless you are using the CTS/RTS/DTR/DSR lines).