I am trying to write a library that will let me execute JSON Logic rules via the Nashorn Javascript engine.  My problem right now is specifically around the JSObject wrapper I've created to handle moving data from Java/Kotlin into the scripting e...
Assume the following API:  package nashorn.test;  public class API {      public static void test(String string) {         throw new RuntimeException("Don't call this");     }      public static void test(Integer... args) {         System...
Consider following code sample:  import javax.script.ScriptEngine; import javax.script.ScriptEngineManager;  public class Tester {    public static void main( String[] args ) throws Exception {       ScriptEngine se = new ScriptEngineManager().getEng...
I'm reading about new Java 8 features and came to know it comes with Nashorn (Javascript engine). Can someone explain me why would/should I use a Javascript engine inside Java. What programming problems it would solve ? any examples   Thanks, Rav...
According to IEEE 754 NaN equal comparison with any number should be false (both Java and JavaScript languages). But in the following code, using javax scriptEngine for JavaScript, a variable set to NaN compared with itself returns true.  import java...
I am interested in a portable way of writing a string to standard output, without implicit newlines added to the end, ideally forcing encoding to UTF-8, that works with either of   jrunscript (from any JDK) Rhino node.js   My current code tries to de...
I am attempting to convert HTML entities/tags from a database column into plain text to be displayed in a report. The report is dynamic and as such is created using scripting functions in BIRT.   Since there is no layout displayed I am unable to chan...
I am facing a weird behavior with Wildfly 8.2.1 running on Java 8 (Open JDK). I am specifically mentioning Java 8, because I did not see this issue on Java 7.  While my Wildfly module is being started, I have code that loads up JavaScripts using the...
I'm experimenting with multi-threaded scripts loading and evaluation in Nashorn and get kind of shocking behavior:  // having some object o loaded in another thread print(o.constructor === o.constructor); // false print(o.constructor === Object);...
I use the following code to run the java application through an HTML file:  document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"" WIDTH = 0 HEIGHT = 0 NAME = "Loading..." ALT = "Can not run jav...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.