JNI library to disable OS X Mavericks & Yosemite 'App Nap' functionality for a Java application.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src/com/cyberfox/util/platform/osx
.gitignore
README.md
com_cyberfox_util_platform_osx_NoNap.h
com_cyberfox_util_platform_osx_NoNap.m
makeme.sh

README.md

This is a simple JNI library to disable App Nap on OS X 10.9 (Mavericks), 10.10 (Yosemite) and theoretically any later version.

You need to include both nonap.jar and libNoNap.jnilib in your classpath, preferably Contents/Resources/Java and referenced in your Info.plist or whatever equivalent you're using to start your Java app.

Then, in your code, you would call it like:

import com.cyberfox.util.platform.osx.NoNap;

public static void main(String[] args) {
  System.loadLibrary("NoNap");
  NoNap.dontNapMeBro();
}

You should be able to see it working by looking at Activity Monitor, under the Energy tab. Under 'App Nap', it should say 'No', and should never change to 'Yes'.

I would recommend first exploring what circumstances your app naps in the first place (minimized, for example), so you can feel comfortable that it's actually not napping once you include these libraries.

The build system is rudimentary, and needs improvement.