I’m using Mozilla Rhino 1.7r2 (not the JDK version), and I want to call a JS function from Java.
My JS function is like this:
function abc(x,y)
{
return x+y
}
How do I do this?
Edit: (The JS function is in a separate file)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
UPDATE: when the function is loaded in the scope, along with other functions and variables