I used to run this script in Startup and Session in Xubuntu 14.04 to autostart my java app:
xfce4-terminal -e "bash -c \"cd /home/restaurant/Documents/dist/ && java -jar POSv2.jar; exec bash\""
but running the same script in 16.04 causes MySQL Exceptions; I assume these exceptions were thrown because MySql wasn't loaded yet when the script ran. Therefore my question to you how can I make sure the script only get called once MySQl has been loaded successfully?