I have a script which downloads a jar file using wget and the next line is java -jar /....path/my.jar
when I run this script if fails with Unable to access jarfile ......../path/my.jar
and when I run this jar file from the shell it works here is my script file
Code:
#!/bin/sh
export JAVA_HOME=/opt/java/
export JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=256m"
rm -rf /opt/artms/config/ec2-config.jar
wget -O /opt/artms/config/ec2-confg.jar https://blah...blah/blah../config/ec2-config.jar
sudo java -jar /opt/artms/config/ec2-config.jar
please advice me.