Unable to get Applescript Engine on some computers
Alan Bateman
Alan.Bateman at oracle.com
Thu Feb 27 03:10:43 PST 2014
On 27/02/2014 10:52, Paul Taylor 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 fine
>
> Any ideas ?
Michael Hall brought this up a few days ago too. I assume you have
/System/Library/Java/Extensions/AppleScriptEngine.jar but some of your
customers don't.
The JDK does include the AppleScriptEngine but is missing the service
configuration file that is needed to locate it. There is a bug open for
this but it does raise the question as to whether the JDK really needs
to bundle this scripting engine or not.
-Alan
More information about the macosx-port-dev
mailing list