Java serial changes