Jar Bundler Help

Discussion in 'Mac Programming' started by slrandall, Sep 4, 2012.

  1. slrandall macrumors 6502

    Joined:
    Jun 15, 2011
    #1
    Hi all,

    I'm building an application in Java for my research collaboration. Eclipse spits out a .jar file that runs fine, no problem. Text, buttons, all the standard UI objects are crystal clear (I have an rMBP).

    But when I try to use Jar Bundler to turn it into a .app bundle, it comes out with very lo-res graphics. Text, buttons, etc. are all grainy and fuzzy.

    I'm attaching screenshots to highlight the problem; the first shows the JAR running, the second shows the .app.

    Any ideas on how to fix this? I'd really like to make a .app (we have a very nice .icns file we'd like to use), but don't want to sacrifice a clear UI.
     

    Attached Files:

  2. jettoblack macrumors member

    Joined:
    Nov 1, 2006
    #2
    The Info.plist in your app bundle must be tweaked to enable Retina support.

    Best to use a proper plist editor like Property List Editor (comes with developer tools I think).

    Add a key named "NSHighResolutionCapable" (Boolean) and set it to YES (true). Also (if it does not exist already) add a key named "NSPrincipalClass" (String), and set its value to "NSApplication".

    Or you can modify the Info.plist with a text editor and manually add/replace these keys:

    <key>NSPrincipalClass</key>
    <string>NSApplication</string>
    <key>NSHighResolutionCapable</key>
    <true/>
     
  3. slrandall thread starter macrumors 6502

    Joined:
    Jun 15, 2011
    #3
    Great, thank you! Wondered why it wasn't working at first, but once I forced ML to rebuild the cache for the plist, everything was crystal clear.
     

Share This Page