On 27/02/2014 11:07, Michael Hall wrote:
On Feb 27, 2014, at 4:52 AM, Paul Taylor <[email protected]> wrote:In my code I have: ScriptEngineManager mgr = new ScriptEngineManager(); ScriptEngine engine = mgr.getEngineByName("AppleScript"); this works fine for me, but for some customers in returns null for engine. We are using Java 1.8.0 25.0-b69 64bit (build 129) Customer was on Mac OS X 10.9.2 x86_64, I've upgraded to same version still don't get the problem. Applescript does exist because earlier in my code I run some applescript using osascript and Runtime class and that works finel don't know that it was precisely determined what caused this. Possibly some change in an OS upgrade where Apple removed something from their java distribution? Although we didn't know it, we were relying on the Apple code being in place. Your three options would be… 1) Provide the code in the jar and dylib yourself. This is what I did and what I made available on github at… https://github.com/mik3hall/AppleScriptEngine All you really need are the jar and dylib. Put the dylib in the application's MacOSX folder. appbundler adds that to LD_LIBRARY_PATH. Put the jar in the application's Java folder, this should get it into class path. Done and should work on any configuration.
FYI I tried this, and it worked ! Brilliant thanks solved a big problem for me Paul
