I have created an application using Java. I have wrapped the jar into a Mac App Bundle so it can be run on a Mac. As part of the created App Bundle, I set up a file association in the .plist file, linking the extension .pwm to the application. In the .plist I have the Role set as Editor.
When I right-click on a file with a .pwm extension and go to "Open With", I see my application. If I click on it, my application starts. So far so good.
The problem is, that my application should start, and then automatically open the file passed in. I have coded my application to look for an argument passed in, and if it finds it and its a file, the it will open the file.
This is working fine on both Windows and Linux, but it seems like on Mac, when I use Open With, it doesn't actually pass the file name on to the application.
I am fairly new to Mac. Am I doing something wrong here? How do I make this work, or does Mac not support the concept of passing in an argument when using "Open With".
Any help would be appreciated.
Victor Ewert
http://www.ewert-technologies.ca
When I right-click on a file with a .pwm extension and go to "Open With", I see my application. If I click on it, my application starts. So far so good.
The problem is, that my application should start, and then automatically open the file passed in. I have coded my application to look for an argument passed in, and if it finds it and its a file, the it will open the file.
This is working fine on both Windows and Linux, but it seems like on Mac, when I use Open With, it doesn't actually pass the file name on to the application.
I am fairly new to Mac. Am I doing something wrong here? How do I make this work, or does Mac not support the concept of passing in an argument when using "Open With".
Any help would be appreciated.
Victor Ewert
http://www.ewert-technologies.ca