好吧,所以我試圖打開一個.jar文件,但無論我嘗試什麼,它總是會出現錯誤。在AppleScript中運行Java腳本
我曾嘗試:
to run
set current_path to POSIX path of (path to me) as string
set pathto to current_path & "Contents/Resources/TechnicLauncher.jar"
tell application "Finder" to open file pathto
end run
與錯誤:
error "Finder got an error: Can’t get file \"/Applications/Technic Launcher.app/Contents/Resources/TechnicLauncher.jar\"." number -1728 from file "/Applications/Technic Launcher.app/Contents/Resources/TechnicLauncher.jar"
這:
to run
set current_path to POSIX path of (path to me) as string
set pathto to quoted form of current_path & "Contents/Resources/TechnicLauncher.jar"
do shell script pathto
end run
與錯誤:
error "sh: /Applications/Technic Launcher.app/Contents/Resources/TechnicLauncher.jar: Permission denied" number 126
我不怎麼做這個工作。誰能幫忙?