Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

slrandall

macrumors 6502
Original poster
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.
 

Attachments

  • Screen Shot 2012-09-04 at 1.38.06 PM.png
    Screen Shot 2012-09-04 at 1.38.06 PM.png
    129.3 KB · Views: 260
  • Screen Shot 2012-09-04 at 1.39.31 PM.png
    Screen Shot 2012-09-04 at 1.39.31 PM.png
    88.1 KB · Views: 242
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/>
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.