Environment variables

2014-02-22 Thread Michael Hall
I think I asked this before. I'm not sure it was answered, not remembering the answer anyhow. Should java System.getenv pick up ones that are added with LSEnvironment in the Info.plist file? It doesn't seem to. What would be a workaround for java code that depends on things like a HOME director

Re: Disabling AppNap from java

2014-02-22 Thread Steve Hannah
For doing simple Objective-C things like this, I wrote an objective-c bridge. It uses JNA and allows you to access any OS X SDK without having to generate stub classes for them (like you do with rococoa). https://github.com/shannah/Java-Objective-C-Bridge Some sample code to give you an idea: Web

Re: Disabling AppNap from java

2014-02-22 Thread Michael Hall
On Feb 22, 2014, at 6:23 PM, Scott Palmer wrote: > On Sat, Feb 22, 2014 at 4:49 PM, Paul Taylor wrote: > >> On 22/02/2014 20:43, Eirik Bakke wrote: >> >>> JNA might be a simpler way to call native functions: >>> https://github.com/twall/jna >>> >>> ... >> >> Not that more native choices ar

Re: Disabling AppNap from java

2014-02-22 Thread Scott Palmer
On Sat, Feb 22, 2014 at 4:49 PM, Paul Taylor wrote: > On 22/02/2014 20:43, Eirik Bakke wrote: > >> JNA might be a simpler way to call native functions: >> https://github.com/twall/jna >> >> ... > > > I think JNA or its own is Wndows only isnt it, but there is something > called rococoa. > To be

JavaAppLauncher

2014-02-22 Thread Michael Hall
Just noticed this in Console.app when launching an application without an embedded JRE… 2/22/14 5:57:39.093 PM JavaAppLauncher[5669]: objc[5669]: Class JavaLaunchHelper is implemented in both /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/lib/jli/libjli.dylib and /Library/Int

Re: Disabling AppNap from java

2014-02-22 Thread Andrew Thompson
I've resisted posting this until now as it will probably just confuse the issue, but on this page you can find code which calls Objective C using both Rococoa and plain old JNI so you can compare and contrast. Of course the problem this is solving has nothing to do with AppNap and so it might

Re: Disabling AppNap from java

2014-02-22 Thread Paul Taylor
On 22/02/2014 20:43, Eirik Bakke wrote: JNA might be a simpler way to call native functions: https://github.com/twall/jna -- Eirik On 2/22/14, 8:51 AM, "Paul Taylor" wrote: I think Im having problems with AppNap with my application, although it is difficult to understand when/if it is kickin

Re: Disabling AppNap from java

2014-02-22 Thread Eirik Bakke
JNA might be a simpler way to call native functions: https://github.com/twall/jna -- Eirik On 2/22/14, 8:51 AM, "Paul Taylor" wrote: >I think Im having problems with AppNap with my application, although it >is difficult to understand when/if it is kicking in. > >'The correct way to disable App

Disabling AppNap from java

2014-02-22 Thread Paul Taylor
I think Im having problems with AppNap with my application, although it is difficult to understand when/if it is kicking in. 'The correct way to disable App Nap is to use the -[NSProcessInfo beginActivityWithOptions:reason:] and -[NSProcessInfo endActivity] APIs within your app via JNI, and on