Re: AppleScript script engine
On 14/02/2014 21:17, Michael Hall wrote: On Feb 13, 2014, at 7:49 PM, Michael Hallmik3h...@gmail.com wrote: Is the AppleScript engine no longer not even the default one but no longer shipped? Not seeing a reply here. Is there a more appropriate forum for OS X specific java questions now? I just checked my local builds of jdk8/tl and jdk9/dev and in both cases jrunscript -q lists the available scripting engines as AppleScript and Nashorn. -Alan.
Re: AppleScript script engine
On Feb 15, 2014, at 11:00 AM, Scott Palmer swpal...@gmail.com wrote: Maybe, but I don't think so. I think that stuff is part of the magic that makes JAVA_HOME work without messing around with the path. I think OpenJDK has a JIRA bug system now, but the usual place at oracle.com still works. Scott I was sort of remembering glancing at this one a while back. I just remembered it seemed to say there were choices for bug filing. http://lists.apple.com/archives/java-dev/2014/Jan/msg00038.html Everyone with OpenJDK Author status or above has a JBS account which may be used to create and edit bugs. Those without accounts can view bugs anonymously. Yeah - if you're not an OpenJDK developer, please continue to use bugs.java.com instead, as before. I guess I'll use bugs.java.com. Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter
Re: AppleScript script engine
On Feb 15, 2014, at 11:00 AM, Scott Palmer swpal...@gmail.com wrote: Maybe, but I don't think so. I think that stuff is part of the magic that makes JAVA_HOME work without messing around with the path. It looked like most of the java commands default link to the Apple Java 6 versions. I set up this in my bash profile jdkhome=`/usr/libexec/java_home -v 1.7` alias jrunscript7=$jdkhome/bin/jrunscript I'm a little leery of using JAVA_HOME having a number of times seen people have problems they couldn't figure out that turned out to be because they JAVA_HOME set and forgot about it. jrunscript7 -q Language ECMAScript 1.8 implemention Mozilla Rhino 1.7 release 3 PRERELEASE But it still doesn't work. I guess I'd better figure out the resources configuration file Alan Bateman mentioned. Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter
Re: AppleScript script engine
If I don't define JAVA_HOME I automatically get the latest jdk when I run commands. Something is handling that. I think it is the commands that are linked to - they don't run java 6 automatically. Scott On Feb 15, 2014 1:01 PM, Michael Hall mik3h...@gmail.com wrote: On Feb 15, 2014, at 11:00 AM, Scott Palmer swpal...@gmail.com wrote: Maybe, but I don't think so. I think that stuff is part of the magic that makes JAVA_HOME work without messing around with the path. It looked like most of the java commands default link to the Apple Java 6 versions. I set up this in my bash profile jdkhome=`/usr/libexec/java_home -v 1.7` alias jrunscript7=$jdkhome/bin/jrunscript I'm a little leery of using JAVA_HOME having a number of times seen people have problems they couldn't figure out that turned out to be because they JAVA_HOME set and forgot about it. jrunscript7 -q Language ECMAScript 1.8 implemention Mozilla Rhino 1.7 release 3 PRERELEASE But it still doesn't work. I guess I'd better figure out the resources configuration file Alan Bateman mentioned. Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter
Re: AppleScript script engine
On Feb 15, 2014, at 10:02 AM, Alan Bateman alan.bate...@oracle.com wrote: On 15/02/2014 14:27, Michael Hall wrote: : Sorry Scott, put you in Led Zeppelin there for a bit. Except for Scott's 1.7.0_51, his and Alan's look to be later versions, so we might assume more recent builds have this fixed? I took a quick poke around and I now see that the reason AppleScript is located on my system is because ServiceLoader is locating the service configuration file in /System/Library/Java/Extensions/AppleScriptEngine.jar. Although the AppleScript script engine is included in rt.jar, there isn't in fact a service configuration file for it resources.jar (resources.jar because that is where resources go in the JDK at this time). So I would suggest submitting a bug on this. jar -uf resources.jar META-INF/services/javax.script.ScriptEngineFactory jrunscript -q Language AppleScript 2.2.4 implemention AppleScriptEngine 1.1 Language ECMAScript 1.8 implemention Mozilla Rhino 1.7 release 3 PRERELEASE Thanks, Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter
Re: AppleScript script engine
On Feb 13, 2014, at 7:49 PM, Michael Hall mik3h...@gmail.com wrote: Is the AppleScript engine no longer not even the default one but no longer shipped? Not seeing a reply here. Is there a more appropriate forum for OS X specific java questions now? Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter
Re: AppleScript script engine
Is the AppleScript engine no longer not even the default one but no longer shipped? My HalfPipe application has some launch dependencies on it being there. It was throwing NPE's apparently not getting the engine. I stuck in some code to list out available engines and get… What Java version are you testing? I don't know anything about the engine as I've never touched it, but the code is there in 7, 8 and 9: jdk/src/macosx/classes/apple/applescript/AppleScriptEngine.java jdk/src/macosx/classes/apple/applescript/AppleScriptEngineFactory.java It hasn't been touched much since the initial port. If it's not working then I'd say it's unintentional since (generally speaking...) dead source is removed. I would recommend filing a bug. Sorry I can't of more help on this :/ -DrD-
Re: AppleScript script engine
On Feb 14, 2014, at 5:47 PM, David DeHaven david.deha...@oracle.com wrote: What Java version are you testing? Command line I show... /usr/libexec/java_home --exec java -version java version 1.7.0_40 Java(TM) SE Runtime Environment (build 1.7.0_40-b43) Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode) Is that the jdk? Probably what jrunscript uses? The application is probably using the 'shared' JRE. alias javajre=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java javajre -version java version 1.7.0_51 Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode) If you do the jrunscript -q do you show AppleScript? Thanks for the reply, Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter
Re: AppleScript script engine
$ jrunscript -q Language AppleScript 2.3 implementation AppleScriptEngine 1.1 Language ECMAScript ECMA - 262 Edition 5.1 implementation Oracle Nashorn 1.8.0 I have Apples, latest Java 6 runtime as well as JDK 1.7.0_51 and JDK 1.8.0 b129 installed. Based on the Oracel Nashorn 1.8.0, I would guess that jrunscript is trying to use Java 8, which is the default on this system: $ java -version java version 1.8.0 Java(TM) SE Runtime Environment (build 1.8.0-b129) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b69, mixed mode) Scott On Fri, Feb 14, 2014 at 6:57 PM, Michael Hall mik3h...@gmail.com wrote: On Feb 14, 2014, at 5:47 PM, David DeHaven david.deha...@oracle.com wrote: What Java version are you testing? Command line I show... /usr/libexec/java_home --exec java -version java version 1.7.0_40 Java(TM) SE Runtime Environment (build 1.7.0_40-b43) Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode) Is that the jdk? Probably what jrunscript uses? The application is probably using the 'shared' JRE. alias javajre=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java javajre -version java version 1.7.0_51 Java(TM) SE Runtime Environment (build 1.7.0_51-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode) If you do the jrunscript -q do you show AppleScript? Thanks for the reply, Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter
Re: AppleScript script engine
On Feb 14, 2014, at 9:23 PM, Scott Palmer swpal...@gmail.com wrote: $ jrunscript -q Language AppleScript 2.3 implementation AppleScriptEngine 1.1 Language ECMAScript ECMA - 262 Edition 5.1 implementation Oracle Nashorn 1.8.0 Thanks, not sure why it doesn't show for me then but thanks. I'll verify AppleScript works at all for me and go from there, newer machine might be it somehow. Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter
Re: AppleScript script engine
On Feb 13, 2014, at 7:49 PM, Michael Hall mik3h...@gmail.com wrote: Is the AppleScript engine no longer not even the default one but no longer shipped? My HalfPipe application has some launch dependencies on it being there. It was throwing NPE's apparently not getting the engine. I stuck in some code to list out available engines and get… ScriptEngineFactory Info Factory class:class us.hall.scripting.RhinoScriptEngineFactory Script Engine:Rhino JavaScript Script Engine (1.0.0) Engine Alias: javascript Engine Alias: js Engine Alias: mozrhino ScriptEngineFactory Info Factory class:class org.jruby.embed.jsr223.JRubyEngineFactory Script Engine:JSR 223 JRuby Engine (1.7.4) Engine Alias: ruby Engine Alias: jruby ScriptEngineFactory Info Factory class:class com.sun.script.javascript.RhinoScriptEngineFactory Script Engine:Mozilla Rhino (1.7 release 3 PRERELEASE) Engine Alias: js Engine Alias: rhino Engine Alias: JavaScript Engine Alias: javascript Engine Alias: ECMAScript Engine Alias: ecmascript No AppleScript? Quicker command line check I came across on google… jrunscript -q Language ECMAScript 1.8 implemention Mozilla Rhino 1.7 release 3 PRERELEASE Seems to confirm no AppleScript. Intentional? Accidental? If this is Open Classpath can we grab the source and go? Michael Hall trz nio.2 for OS X http://www195.pair.com/mik3hall/index.html#trz HalfPipe Java 6/7 shell app http://www195.pair.com/mik3hall/index.html#halfpipe AppConverter convert Apple jvm to openjdk apps http://www195.pair.com/mik3hall/index.html#appconverter