private static String getBundleName() {
    String bundleName;
    final ID nativePool = Foundation.invoke("NSAutoreleasePool", "new");
    try {
      final ID bundle = Foundation.invoke("NSBundle", "mainBundle");
      final ID dict = Foundation.invoke(bundle, "infoDictionary");
      final ID nsBundleName = Foundation.invoke(dict, "objectForKey:", Foundation.nsString("CFBundleName"));
      bundleName = Foundation.toStringViaUTF8(nsBundleName);
    }
    finally {
      Foundation.invoke(nativePool, "release");
    }
    return bundleName;
  }
private static String getBundleName()