-1

Simple question:

I have one javaScript File , and eclipse. Is it possible to run that script file using eclipse through command line.
If yes:
what i have to do .

If no:
Is there is any possibility to do this. any input will appreciated.

Thanks.

Sumit Singh
  • 15,743
  • 6
  • 59
  • 89
  • You'd need some sort of a JavaScript interpreter for that... And I don't really get how Eclipse is in the picture. This question in this form is not clear. – ppeterka Jan 24 '13 at 09:25
  • eclipse have JSDT right. Through which we can debug our script in eclipse. So i want to run it through jsdt of eclipse in command line. – Sumit Singh Jan 24 '13 at 09:32

3 Answers3

0

Eclipse's JSDT has a built-in rhino interpreter (new in Eclipse Juno). I have never used it myself, but it is possible to use it for interpreting your JS scripts. More information here.

Now if your JS script interacts with the DOM or the window, then rhino will not help you, but for pure, headless JS this will work.

Andrew Eisenberg
  • 28,387
  • 9
  • 92
  • 148
0

if you are using eclipse juno(e4) , command /handler support calling JavaScript.

Khalid Azam
  • 1,615
  • 19
  • 17
0

phantomjs is an webkit based headless web browser that could be invoked from command line. From this tutorial you could learn how to integrate eclipse and phantomjs to execute javscript files.