you run on a linux system. please confirm the serial com name is "/dev/ttyM0"? right?
and this should be a jssc environment problem,pleause comfirm if you lose some jar lib