Questions tagged [rhino]

Mozilla Rhino is a JavaScript interpreter written in Java.

Rhino is the 100% open source JavaScript engine written in plain Java

Rhino is typically embedded in Java applications to offer JavaScript scripting capabilities, but can also be used from the command-line using the Rhino shell

Visit the Rhino project on GitHub or checkout the documentation

Use with

  • for questions about using the original / old runtime of Google Apps Script.
  • and for questions about migrating code from the old runtime to the new runtime or about using the old runtime as a workaround for new runtime issues.

Do not use with for questions that use the new Google Apps Script runtime.

975 questions
-1
votes
1 answer

Convert DOM Node to String without using javax.* classes

When I'm trying to use found solutions to convert from Node to String in javascript, starting from this line var transformer = javax.xml.transform.TransformerFactory.newInstance().newTransformer(); it says Message: (Desired evaluation could not…
VextoR
  • 5,087
  • 22
  • 74
  • 109
-1
votes
1 answer

OSGI embedded classes not resolving

We are using Day cq. It uses Apache Felix osgi container. In one of our projects we are using Rhino for serverside scripting. Day already comes with Rhino library included as part of org.apache.sling.scripting.javascript - here Rhino library is part…
sanat
  • 91
  • 7
-1
votes
1 answer

Java scripting NoSuchMethodException?

I'm working on getting (JavaScript) scripting to work in Java. I have a program in JavaScript, defined in my Java program (along with instances of all the necessary script engine related things) like so: static ScriptEngineManager engineManager =…
user263078
-2
votes
1 answer

How to compare two strings case insensitive in Rhino js

I intend to check if a string is a substring of another string. However, case insensitive match is not possible since toLowerCase() and toUpperCase() methods are not supported in Rhino 1.7.13. var…
Karan Nayyar
  • 666
  • 2
  • 7
  • 14
-2
votes
2 answers

Replace all semicolon with plus sign except last

i want to replace all semicolon (;) with plus (+) sign except the last semicolon. ex - i have something like this - Apple; Banana; Apple;Banana; Apple;Banana;Orange; Apple;Banana;Orange;Mango; i want to get result like this - Apple; Banana; Apple…
vish
  • 29
  • 4
-2
votes
1 answer

What programming language is this Maximo automation script written in?

I'm trying to teach myself Maximo automation scripting. I've come across a script in the Maximo help. I want to try to understand how it works. But first, what programming language is it written in? service.log("I want to multiply 2 numbers and log…
User1974
  • 276
  • 1
  • 17
  • 63
-2
votes
1 answer

Javascript interpreter for Ecmascript 6?

What javascript interpreters suppport Ecmascript6? Currently rhino does not support es6 what are the alternatives?
Bootstrap4
  • 3,671
  • 4
  • 13
  • 17
-2
votes
1 answer

How to use Rhino

Possible Duplicates: I am looking forward to call some javascript method from a java class can anyone give a complete example of how to call a js using java file??? HI, i have a javascript file script.js and a class file callScript.java i want…
Varun
  • 5,001
  • 12
  • 54
  • 85
-2
votes
3 answers

Merge two lists which representing points with python

I´m working with python in Rhino 3D and have following problem. I have two Lists representing points. List one for example: StartPoints = [[x1,y1,z1],[x2,y2,z2],[x3,y3,z3]] and the second list is: EndPoints = [[x4,y4,z4],[x5,y5,z5],[x6,y6,z6]] My…
-2
votes
1 answer

Can't run Rhino examples: missing package

This may be a silly question but I've just downloaded Rhino on my Windows 7 machine and I'm trying to run some of the examples. However, it says package org.mozilla.javascript does not exists Here's the exact context (running through Git…
Mike Cluck
  • 31,869
  • 13
  • 80
  • 91
-3
votes
1 answer

How do I call on C++ from Mozilla Rhino's Javascript

I'm using Mozilla Rhino for my application and I need to call on a C/C++ library during implementation. Is there any easy way to do this other than calling on c/C++ functions through java directly?
waynchi
  • 144
  • 1
  • 7
-3
votes
2 answers

Why would I like to execute scripting language in JVM

I am not able to understand why and in what kind of scenario I would like to run scripting language inside JVM at server side. I mean we already have great libraries available in JAVA... why wouldn't I use use them to do stuff instead of running…
G.D
  • 305
  • 5
  • 18
-3
votes
1 answer

Is the $ sign not recognized by Rhino Script Engine?

I'm trying to call a javascript from my java class. Please find below my java code: File file = new File(".....js"); ScriptEngineManager factory = new ScriptEngineManager(); // create a JavaScript engine …
niz
  • 19
  • 1
  • 7
-4
votes
2 answers

Importing tuples from text file into a list

I have tuples( one in each line) in a text file names as listCls.txt . They look like this (10.0, 0.0, 0.0) (9.297883, 3.680947, 0.0) (7.071068, 7.071068, 0.0) I want to import this text file as a list in my python script as following. list =…
zee
  • 17
  • 2
-6
votes
1 answer

Java, C# and javascript

I am wanting to advance my Browser (Google) capabilities to be able to read and write files saved on my PC using Javascript and I am considering using Rhino (because it is discussed in my manual). However, Rhino uses Java to interact with; a…
hemis
  • 45
  • 1
  • 2
  • 11
1 2 3
64
65