I have a legacy shell script that is being called by the Autosys job scheduler. In the script they are calling a jar file
res="`$JAVA_HOME/bin/java ....`"
echo >$res<
and I am getting the following error.
Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
So in the shell script I tried to print the current directory as shown below
echo "PWD:" "$PWD" # Nothing gets printed.
echo "USER:" "$USER" # User id is getting printed
if [ -d "/export/home/abc/" ]; then
echo "Directory present" # gets printed
echo `ls -ltr` # total 3 gets printed
echo `cd /export/abc/def`
echo `pwd` # nothing gets printed
fi
All the class paths are being set in the script itself and the class path looks fine. I am not getting what might be the issue here.
Also note that this script is being called by another script which intern called by Autosys job scheduler.