Этот код AppleScript дает имя файлам, которые были добавлены в скрипт. Как мне сделать то же самое в приложении Objective-C? Может ли приложение, написанное на Objective-C, загрузить файл JAR, используя имя файла в качестве аргумента JAR?
on open of theFiles -- Executed when files are dropped on the script
set fileCount to (get count of items in theFiles)
repeat with thisFile from 1 to fileCount
set theFile to item thisFile of theFiles
set theFileAlias to theFile as alias
tell application "Finder"
set fileInfo to info for theFileAlias
set fileName to name of fileInfo
-- something to this effect, but now that you have the file name,
-- do what you will...
do shell script "cd /Desktop/RunJar/; java -jar " & fileName
end tell
end repeat
end open
Нам нужно заменить этот AppleScript на скомпилированное приложение, которое может запускать JAR, который был добавлен в скомпилированное приложение.