You may be missing some key environment variables when running via cron. Type ‘env’ while logged in via ssh and look for JAVA specific variables, especially CLASSPATH.
Then add those to your crontab as an export before executing the app.
/usr/bin/java -jar /home/myuser/myprogram.jar
Hmmmm…actually, the export should go on the same line as the exec:
export CLASSPATH=$CLASSPATH:/what/ever && /usr/bin/java -jar /home/myuser/myprogram.jar
Or, place all that in a .sh script and run the script from cron