On Mac OS X opening my document by double clicking at the document fails if my application is not already running
When launching my drawing application by double clicking at a document Finder shows a dialog which says:
The document "test.jdwg" could not be opened. Application "jDraft" cannot open files in the "jDraft Document" format.
This message dialog appears before my application has time to even put up its splash screen, however the application is launched in the background (I see the splash screen) and when I double click again at the document my application correctly opens it.
As a background this application has been working (in this respect) for years. This problem appeared now when I'm trying to use the JWrapper to package my application.
Following is Info.plist
for my application.
I suspect this maybe related to the way JWrapper lauches or forks the JVM to run the application ... hard to tell because JWrapper is closed source and thus pretty much beyond debuggin.
Has anyone managed to make file associations work with JWrapper on Mac OS X?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleName</key>
<string>jDraft</string>
<key>CFBundleIdentifier</key>
<string>jwrapper.osx.jDraft</string>
<key>CFBundleVersion</key>
<string>43568712</string>
<key>CFBundleAllowMixedLocalizations</key>
<string>true</string>
<key>CFBundleExecutable</key>
<string>osxwrapper</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>LSUIElement</key>
<true/>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIconFile</key>
<string>AppLogo.icns</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeName</key>
<string>jDraft Drawing 2</string>
<key>LSHandlerRank</key>
<string>Default</string>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleTypeIconFile</key>
<string>jDraft-doc-jdwg.icns</string>
<key>CFBundleTypeExtensions</key>
<array>
<string>jdwg</string>
</array>
<key>CFBundleTypeOSTypes</key>
<array>
<string>jdwg</string>
</array>
</dict>
</array>
</dict>
</plist>