You could need to reload the environment variable within your java script.
If your profile is ~/.bash_profile, which contained the classpath of java, to add these lines within your java script.
# Get the environment variable
if [ -f ~/.bash_profile ]; then
. ~/.bash_profile
fi
Quote:
Originally Posted by manu82
Hi All,
i m trying to run a java program through cron but it is not running
while i tried to run java program through script ,it is working fine
i have already set the environment variable ,classpath for java
the following are cron.txt file which i run
!/bin/bash
* * * * * path to java/java StreamingSolution
could anybody tell me what is the exact problem
Thanks & Regards,
Bhushan Verma
|