Hello,
When using JavaMacLauncher as a Java stub, when using Info.plist to associate a extension with the program (e.g. *.por files), when clicking into a *.por file, it opens the Java program but it didn't pass the file path as an argument to the Java program.
In AppleScript, it's possible to intercept them using "On Open", that receives kAEOpenDocuments (Apple Events), as "Open With" actions do not pass them as arguments (argv) to the executable, instead, it passes the files to open as an Apple Event. There's a workaround in https://github.com/RichardBronosky/AppleScript-droplet which receive those events and bypass them to the Bash script as arguments.
Hello,
When using JavaMacLauncher as a Java stub, when using
Info.plistto associate a extension with the program (e.g.*.porfiles), when clicking into a*.porfile, it opens the Java program but it didn't pass the file path as an argument to the Java program.In AppleScript, it's possible to intercept them using "On Open", that receives kAEOpenDocuments (Apple Events), as "Open With" actions do not pass them as arguments (argv) to the executable, instead, it passes the files to open as an Apple Event. There's a workaround in https://github.com/RichardBronosky/AppleScript-droplet which receive those events and bypass them to the Bash script as arguments.