/usr/local/bin/ not found by Automator and Java but exists in Terminal
Automator uses the path variable hard coded in the kernel.

sysctl user.cs_path
user.cs_path = /usr/bin:/bin:/usr/sbin:/sbin


Actually, this is the path set for a user's launchd and is then inherited by Automator when you launch the application.

launchctl getenv PATH
/usr/bin:/bin:/usr/sbin:/sbin


Use the absolute paths to your executables or modify the PATH in the Run Shell Script.