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')")

hello

Thats all!!

1 comment:

David Jones said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training from India . Nowadays Java has tons of job opportunities on various vertical industry.