Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In OSX there is a hidden utility called jsc, part of WebKit, that can be used to run JavaScript code on the command line. It can be used as a JavaScript console, like irb for Ruby.

I have the libwebkitgtk-3.0 and -3.0-dev libraries installed, but I cannot figure out how to find or build jsc. Is it even possible?

Note: I already know about alternatives like Rhino, SpiderMonkey, etc.

share|improve this question

2 Answers 2

up vote 6 down vote accepted

Install a link to install rhino and use rhino-jsc (see manpage)

share|improve this answer

Another solution is to install nodejs:

sudo apt-get install nodejs npm

The above will not always install the most recent version, in which case you can try:

sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
share|improve this answer

Your Answer

 
discard

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.