Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to excute javascript file without a browser. I found Mozila Rhino, but I wonder that how can I config sublime text or another text editor run my .js file directly (i.e without run command line).

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Linux solution:

Create a bash file: /usr/sbin/rhino

java -cp /opt/rhino1_7R3/js.jar:. "$@"

Note: /opt/rhino1_7R3 is where I installed my rhino — you can extract it where you please.

On Sublime, go to Tools » Build System » New Build System. Paste the following and save the file.

    "cmd": ["rhino", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.javascript"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.