Hugo Garcia wrote:
On 6/4/07, Dave Howorth
wrote: I'm trying to run a Java program from a cron job and have discovered that JAVA_HOME and friends aren't set. What's the best way to set them for cron jobs?
I'm presently on 9.3 but will be moving to 10.2 shortly.
Once you update to 10.2 and install Java 1.5 then your JAVA_HOME and friends will be set. For 9.2 you have to set the environment variables in your .bashrc or your .profile.
Thanks for the reply but I don't think it answers my question. On 9.3 (and also on 9.2 since you mention it) the Java environment variables are set automatically by /etc/profile.d/alljava.sh. There's no need to set them manually in individual profiles. But that's not what I'm asking. I'm asking specifically about the environment used by cron jobs. The JAVA_* variables are not set in the environment cron uses and neither does it read .bashrc or .profile Obviously, I could source one or other of these scripts in my cron job, but I'm wondering what the best/accepted method of doing this is? Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org