jsr223 Questions

5

Solved

My program uses Java Scripting API and can eval some scripts concurrently. They don't use shared script objects, Bindings or Context, but can use same ScriptEngine and CompiledScript objects. I see...
Agriculture asked 9/5, 2015 at 12:47

1

We are currently in the process of adding a server-side scripting capability to one of our products. As part of this I am evaluating JSR 223 script engines. As we may potentially be running large n...
Theophylline asked 9/6, 2014 at 8:47

5

Solved

I have the following: ScriptEngineManager mgr = new ScriptEngineManager(); ScriptEngine jsEngine = mgr.getEngineByName("JavaScript"); jsEngine.eval("function getArray() {return [1,2,3,4,5];};"); O...
Berk asked 16/9, 2009 at 14:36

2

I'm running the following code and it's taking between 3 and 6 seconds to execute on both OSX (Sierra) and Windows 10. I've never seen such slowness using JSR-223, especially considering the simpli...
Potemkin asked 13/2, 2018 at 23:36

5

println() inside static void main method is not printing anything anywhere, whereas only println() prints in terminal. Here is my code: class CalcMain { static void main(def args) throws Exception ...
Sanasanabria asked 6/11, 2013 at 6:42

1

Solved

When you call : Object isThreadSafe = scriptEngine.getFactory().getParameter("THREADING"); It returns MULTITHREADED as per: https://docs.oracle.com/javase/8/docs/api/javax/script/ScriptEngi...
Capelin asked 6/2, 2018 at 14:1

3

Solved

I am using Nashorn via JSR 223 to execute small snippets of user entered script: public Invocable buildInvocable(String script) throws ScriptException { ScriptEngine engine = new ScriptEngineMana...
Brumbaugh asked 31/3, 2014 at 1:17

1

Solved

I want to use velocity language as Scripting language in JMeter's JSR 223 Sampler. According to the list velocity can be used in JSR223, According to the answer velocity should be added to JMeter...

1

Solved

About JSR 223 Sampler languages, I can choose between javascript (ECMAScript ECMA 262 Edition 51 / Oracle Nashorn 1.8.0_144) and js (ECMAScript ECMA 262 Edition 51 / Oracle Nashorn 1.8....
Sublimate asked 14/8, 2017 at 6:16

1

Solved

I have a fat jar where I'm trying to get the instance of Kotlin's ScriptEngine. For the debugging purposes I'm iterating through available Script Engine Factories and getting the engines. val sc...
Olga asked 27/6, 2017 at 13:24

3

Solved

I've recently written a small specialist scripting language and used the Maven to export an OSGi compliant bundle that also exports a service descriptor into the "META-INF/services/javax.script.Scr...
Borough asked 2/7, 2011 at 15:58

4

Solved

I need a JVM-based scripting language for my app and would like to see what else is out there besides Groovy, Ruby, and Python. Google keeps pointing me to a dead page at http://scripting.d...
Winifield asked 7/8, 2012 at 2:7

4

Solved

In my code, all of the scripts are contained in .js files. Whenever one of the scripts contains an error, I get this: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: R...
Melissiamelita asked 21/5, 2010 at 19:50

1

Solved

In the sbt console, sbt version 0.13.5, Scala version 2.11.1, I can get javax.script.ScriptEngine for Scala: scala> val engine = new javax.script.ScriptEngineManager().getEngineByName("scala") ...
Goody asked 30/5, 2014 at 18:23

2

Solved

I have a Groovy script which is run like this: File scriptFile = ...; ScriptEngine engine = ...; String script = FileUtils.readFileToString(scriptFile); Object evalResult = engine.eval(script, bin...
Vanny asked 1/8, 2012 at 11:57

3

So far I have tried the sling implementation for jsr223 scripting for scala, but was not able to get it set up correctly. when I do this: public static void main(String[] args) { try { new Scri...
Vibraculum asked 13/4, 2011 at 19:58

1

Solved

I am at a situation where I need to be able to create and expose a webservice at run time. (i.e. no "javac"-compilation step). Is there a JVM-based scripting language that has good support for JAX...
Tanagra asked 20/8, 2012 at 8:37

1

I'm developing a java application where some logic is performed via jsr223 (javascript). In java class I forward some java object to javascript (e.g. my domain objects, PreparedStatement for some S...
Houseman asked 23/6, 2012 at 18:26

1

I'm executing Javascripts using the JSR-223 script engine built into JRE6. The Javascripts are able to access Java code and objects. When an exception is thrown from the Java code that is executed ...
Rimple asked 25/10, 2011 at 12:37

3

Solved

I am using Jython 2.5.1 with JSR-223 (i.e. javax.script package) and I expect the last line of the Python script to be returned. For example, after evaluating this script: class Multiplier: def ...
Sharyl asked 11/12, 2009 at 10:59

1

Solved

I'm starting to run into the dirty little secrets of what is an otherwise very useful JSR223 scripting environment. I'm using the builtin version of Rhino shipped with Java 6 SE, accessing it thro...
Deka asked 5/4, 2011 at 19:7

3

I'm trying to sandbox JSR-223. Specifically, I don't want any script to have access to any of my classes. (I hear Rhino can do that with ClassShutter, but I want to do it generally. ie. for all scr...
Almatadema asked 9/9, 2009 at 12:52
1

© 2022 - 2024 — McMap. All rights reserved.