Re: RFR(XS): 8130306: enable running Nashorn test on Windows

2015-07-02 Thread A. Sundararajan
+1 On Thursday 02 July 2015 02:26 PM, Michael Haupt wrote: Dear all, please review and sponsor this change: RFE: https://bugs.openjdk.java.net/browse/JDK-8130306 Webrev: http://cr.openjdk.java.net/~mhaupt/8130306/webrev.00 This fixes, in test code, an issue with executable file naming on Windo

Re: RFR(XS): 8130306: enable running Nashorn test on Windows

2015-07-02 Thread Hannes Wallnoefer
+1 Am 2015-07-02 um 10:56 schrieb Michael Haupt: Dear all, please review and sponsor this change: RFE: https://bugs.openjdk.java.net/browse/JDK-8130306 Webrev: http://cr.openjdk.java.net/~mhaupt/8130306/webrev.00 This fixes, in test code, an issue with executable file naming on Windows. Thank

RFR(XS): 8130306: enable running Nashorn test on Windows

2015-07-02 Thread Michael Haupt
Dear all, please review and sponsor this change: RFE: https://bugs.openjdk.java.net/browse/JDK-8130306 Webrev: http://cr.openjdk.java.net/~mhaupt/8130306/webrev.00 This fixes, in test code, an issue with executable file naming on Windows. Thanks, Michael -- Dr. Mich

Re: Running Nashorn under java.lang.instrument

2014-10-14 Thread David P. Caldwell
OK, I actually have this "working" (not crashing) now. I did not have to update my JDK. The main impediment I actually had was the Nashorn is loaded in the extension class loader, and java.lang.instrument-loaded agents are loaded in the application class loader. So in order to get my profiler to

Re: Running Nashorn under java.lang.instrument

2014-10-14 Thread David P. Caldwell
Part of the issue is that I was incorrect that Nashorn would be loaded by the system class loader; it is actually loaded by the extensions class loader, so my code will indeed attempt to instrument Nashorn itself. I don't know whether that should work or not, but it's not what I was trying to do, s

Re: Running Nashorn under java.lang.instrument

2014-10-13 Thread Vladimir Ivanov
David, There was a bug fixed recently (JDK-8058536 [1]), which blocked usage of java.lang.invoke from java agents. Unfortunately, the fix is not part of any release yet. Latest 8u40 & 9 early access builds should contain it. Please, give them a try. Best regards, Vladimir Ivanov [1] https:/

Running Nashorn under java.lang.instrument

2014-10-13 Thread David P. Caldwell
So if I run Nashorn under a Java agent, I can't start it. I haven't yet dug into the error, but when I invoke: return new ScriptEngineManager().getEngineByName("nashorn") != null , which is my "is Nashorn installed" check, the following prints to System.err: ScriptEngineManager providers.next():

Re: Running Nashorn

2013-08-21 Thread Andrew Thompson
Can't whatever is being done in the static initializer be moved to be done lazily when the AppleScriptEngine is actually used. On Aug 7, 2013, at 10:21 AM, "Jim Laskey (Oracle)" wrote: > I'm filing a bug against AppleScriptEngine.jar. Other than removing it, > there is no long term fix. BT

Re: Running Nashorn

2013-08-21 Thread Andrew Thompson
Can't whatever is being done in the static initializer be moved to be done lazily when the AppleScriptEngine is actually used. On Aug 7, 2013, at 10:21 AM, "Jim Laskey (Oracle)" wrote: > I'm filing a bug against AppleScriptEngine.jar. Other than removing it, > there is no long term fix. BT

Re: Running Nashorn

2013-08-07 Thread Jim Laskey (Oracle)
Filed as JDK-8022555 [macosx] AppleScriptEngine.jar MUST call java.awt.Toolkit.getDefaultToolkit() lazily On 2013-08-07, at 2:21 PM, "Jim Laskey (Oracle)" wrote: > I'm filing a bug against AppleScriptEngine.jar. Other than removing it, > there is no long term fix. BTW, if you do need AppleS

Re: Running Nashorn

2013-08-07 Thread Jim Laskey (Oracle)
I'm filing a bug against AppleScriptEngine.jar. Other than removing it, there is no long term fix. BTW, if you do need AppleScript you can do it from Nashorn; https://blogs.oracle.com/nashorn/entry/playing_itunes_from_nashorn . Cheers, -- Jim On 2013-08-07, at 12:26 PM, Kasper Nielsen wr

Re: Running Nashorn

2013-08-07 Thread Kasper Nielsen
My code is pretty simple: import javax.script.ScriptEngineManager; public class EngineTest { public static void main(String[] args) throws Exception { new ScriptEngineManager(); Thread.sleep(10); } } > Javac EngineTest.java > Java EngineTest -> A window pops up. Apple

Re: Running Nashorn

2013-08-07 Thread Jim Laskey (Oracle)
All Macs have that (I use a Mac). I don't run into that problem though. So you are walking through the engines list? On 2013-08-07, at 11:19 AM, Kasper Nielsen wrote: > On Wed, Aug 7, 2013 at 2:13 PM, Jim Laskey (Oracle) > wrote: > Kasper, > > > - Check to see if you have other script e

Re: Running Nashorn

2013-08-07 Thread Kasper Nielsen
On Wed, Aug 7, 2013 at 2:13 PM, Jim Laskey (Oracle) wrote: > Kasper, > > > - Check to see if you have other script engines installed that might > trigger a GUI. > > Yup, it was this one. I'm on OSX and http://hg.openjdk.java.net/jdk8/jdk8/jdk/file/690161232823/src/macosx/classes/apple/applescrip

Re: Running Nashorn

2013-08-07 Thread Jim Laskey (Oracle)
Kasper, It should work as is. I regularly use Nashorn for shell scripting headlessly. - Check to make sure you are using the latest JDK 8. There was a bug in ScriptManager that was fixed many releases ago. http://jdk8.java.net/download.html - Check to see if some other command line option is

Running Nashorn Headless

2013-08-06 Thread Kasper Nielsen
Sorry, for the misleading title. Accidentally pressed send. On Wed, Aug 7, 2013 at 8:08 AM, Kasper Nielsen wrote: > Hi, > > I'm developing a small library that utilizes Nashorn. > And I was wondering how I can get a headless NashornScriptEngine without > requiring users > to set java.awt.headles

Running Nashorn

2013-08-06 Thread Kasper Nielsen
Hi, I'm developing a small library that utilizes Nashorn. And I was wondering how I can get a headless NashornScriptEngine without requiring users to set java.awt.headless = true? The dialog box that pops up every time is really annoying. Cheers Kasper