I am writing an app that uses the .scpt file to execute a jar in the same directory. I know how to use applescript to get the current directory, and I know that I did it correctly because when I print how my command, which looks like this:
do shell script "/usr/bin/java -jar /Users/name/Desktop/test.app/Contents/Resources/Scripts/myJarFile.jar"
Now the problem is, if I copy and paste this into a terminal, it runs properly, but in applescript it gives me this error:
error "Exception in thread \"main\" java.util.NoSuchElementException
at java.util.Scanner.throwFor(Scanner.java:838)
at java.util.Scanner.next(Scanner.java:1347)
at Runner.main(Runner.java:22)" number 1
Also, I have tried executing a shell script that runs the above command, but to no avail (when it is called from applescript of course).