That's all, I have a problem with my bash script. What is my code:
#!/bin/bash
java -jar my_app.jar
echo "The present working directory is `pwd`"
If I do it with. / script _name, it works, but if I double-click on it, it doesn’t work, I got this error:
"Could not access jarfile my_app.jar".
Then the output pwd is different.
My OS is MacOSX, but I need to create a bash script that also works on Linux.
source
share