Sharing environment variables between zsh and bourne shell (for crontab)
0
votes
2
answers
449
views
I set JAVA_HOME in .zshrc:
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/
which is fine for interactive programs. But I have JVM programs running via cron, which uses Bourne shell. The bourne shell programs keep giving me this:
groovy: JAVA_HOME is not defined correctly, can not execute: /usr/lib/jvm/default-java/bin/java
What's the neatest way to solve this? I don't remember having to worry about this before. Currently I'm setting JAVA_HOME on every crontab entry which is burdensome and redundant.
Asked by Sridhar Sarnobat
(2012 rep)
Mar 23, 2021, 09:09 PM
Last activity: Mar 25, 2021, 03:42 PM
Last activity: Mar 25, 2021, 03:42 PM