How do I run Java programs from a crontab entry?
Processes run by crontab are owned by the user who created the crontab entry, but they don't inherit the user's login environment - including the PATH environment variable. So they don't usually know where to find the java executable.
Here are a couple of ways to solve this:
Have the crontab entry run a script that sets up the environment you need and then runs the command.