Tuesday, August 10, 2010

Installing Rhino on mac

From Rhino :
Rhino is an open-source implementation of JavaScript written entirely in Java. It is typically embedded into Java applications to provide scripting to end users.

Rhino is an implementation of JavaScript in Java. Features include full implementation of JavaScript 1.7 and allows direct scripting of Java and more...

There are some good frameworks available like this one from my friend Fred Polgrady, http://github.com/sustainablecode/datastore

I will provide an easy way of installing Rhino on a mac. Follow these three steps for an easy installation...

1. Download Rhino

2. Create "Java/Extensions" in home directory "~/Library/Java/Extensions"

3. Copy the js.jar file from the downloaded Rhino zip file to "Extensions" directory.

Thats it!! You are all set to use Rhino.

$ java org.mozilla.javascript.tools.shell.Main

Rhino 1.7 release 2 2009 03 22

js> eval("print('hello')")


Thats all!!

No comments: