• Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling JS function in java  RSS feed

 
arfeen khan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a js file located at following URL--
http://abc/test.js

In this js file number of functions are written.
One function name callMeFromJS() is of my interest.

Now what i need is to call the "callMeFromJS()" in my java code.

Can anybody help on this?

Thanks,
Arfeen.
 
Tim Moores
Saloon Keeper
Posts: 4036
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where is this Java code running - a servlet? an applet? somewhere else?
 
arfeen khan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim, thank you for the response.
Well, the code is simple java based stand alone.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java has a scripting API, in the package javax.script. It comes with an interpreter for running JavaScript code.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!