It's most likely a permission issue. Try running your application using sudo. In my case the jar is called serialtest.jar, so I use the command If you want to run the application without using sudo constantly, you have to add your user to the correct group. In my case it is the dialout group (Ubuntu Server 16.04 LTS). To see what group your port belongs to you can issue Example (in my case)
Now I just add myself to the group dialout with Then I log out and back in and voila, I can run the application without sudo.
Reference:
https://unix.stackexchange.com/questions/14354/read-write-to-a-serial-port-without-root