{"id":285,"date":"2008-06-15T16:53:00","date_gmt":"2008-06-15T16:53:00","guid":{"rendered":"http:\/\/new.cottee.org\/2008\/06\/rhino-on-os-x-leopard\/"},"modified":"2008-06-15T16:53:00","modified_gmt":"2008-06-15T16:53:00","slug":"rhino-on-os-x-leopard","status":"publish","type":"post","link":"https:\/\/cottee.org\/?p=285","title":{"rendered":">Rhino on OS X Leopard"},"content":{"rendered":"<p>>When I was using Ubuntu as my main development environment I used rhino to try and learn Javascript in a bit more detail. <\/p>\n<p>Coming back to OS X means that I wanted rhino but had no idea how to install. This is how I did it. If you come across this page and it&#8217;s wrong please let me know. I just wanted to get something running. <\/p>\n<p>1. Get the source file and extract it. I used ftp:\/\/ftp.mozilla.org:21\/pub\/mozilla.org\/js\/rhino1_7R1.zip. Use unzip rhino_7R1.zip if it doesn&#8217;t extract. <\/p>\n<p>2. In the top level you&#8217;ll see a js.jar file &#8211; copy that to \/usr\/share\/java (sudo cp js.jar \/usr\/share\/java)<\/p>\n<p>3. Create the following script in \/usr\/local\/bin\/rhino (this is copied from the rhino install on Ubuntu Hardy)<\/p>\n<pre>#!\/bin\/sh<br \/><br \/>\/usr\/bin\/java -jar \/usr\/share\/java\/js.jar $@<\/pre>\n<p>4. Make it executable (chmod +x \/usr\/local\/bin\/rhino)<\/p>\n<p>Now if you type rhino you can do the following <\/p>\n<pre>mbp:java icottee$ rhino <br \/>Rhino 1.7 release 1 2008 03 06<br \/>js> x = 23 * 44<br \/>1012<br \/>js> y = 'fish'<br \/>fish<br \/>js> x<br \/>1012<br \/>js> y<br \/>fish<br \/>js> <br \/><\/pre>\n<p>Truely you are a javascript god. <\/p>\n<div class=\"blogger-post-footer\"><img width='1' height='1' src='https:\/\/blogger.googleusercontent.com\/tracker\/9210244490645736884-8829088102533604561?l=blog.cottee.org' alt='' \/><\/div>\n","protected":false},"excerpt":{"rendered":"<p>>When I was using Ubuntu as my main development environment I used rhino to try and learn Javascript in a bit more detail. Coming back to OS X means that I wanted rhino but had no idea how to install. This is how I did it. If you come across this page and it&#8217;s wrong please let me know. I just wanted to get something running. 1. Get the source file and extract it. I used ftp:\/\/ftp.mozilla.org:21\/pub\/mozilla.org\/js\/rhino1_7R1.zip. Use unzip rhino_7R1.zip&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/cottee.org\/?p=285\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[28,38],"class_list":["post-285","post","type-post","status-publish","format-standard","hentry","category-oldsite","tag-javascript","tag-osx"],"_links":{"self":[{"href":"https:\/\/cottee.org\/index.php?rest_route=\/wp\/v2\/posts\/285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cottee.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cottee.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cottee.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cottee.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=285"}],"version-history":[{"count":0,"href":"https:\/\/cottee.org\/index.php?rest_route=\/wp\/v2\/posts\/285\/revisions"}],"wp:attachment":[{"href":"https:\/\/cottee.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cottee.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cottee.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}