Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JAVA_HOME not set when running a task via CRON

931834Jun 24 2013 — edited Jun 27 2013

On my Solaris 11 server I have created an entry in the root user CRON tab to launch a groovy based application every weekend. The application runs fine under a non-root user. When run by CRON however, the following error message gets emited:

groovy: JAVA_HOME not set and cannot find javac to deduce location, please set JAVA_HOME

Which is weird, as I have the following lines at the end of my /etc/profile file:


JAVA_HOME=/usr/jdk/instances/jdk1.7.0
export JAVA_HOME

GROOVY_HOME=/usr/local/bin/groovy-2.1.3
export GROOVY_HOME

PATH=${PATH}:${GROOVY_HOME}/bin:${JAVA_HOME}/bin
export PATH

Please advice me where to look for the cause of this problem.

Thank you in advance,

Dusan

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 25 2013
Added on Jun 24 2013
3 comments
2,746 views