JavaScript > Rhinoのインストール
更新日
2011-12-19
広告
RhinoはJavaで実装されたJavaScriptエンジンです。 JavaScriptでJavaプログラムを記述できます。 また、SpiderMonkeyのように、シェル上でJavaScriptを実行することもできます。
UbuntuにRhinoをインストールするのは簡単です。~$ sudo apt-get install rhino
これで、rhinoコマンド(もしくはjsコマンド)がインストールされます。
jsコマンドは、rhinoコマンドへのシンボリックリンクなので、どちらも同じです。 両方のコマンドでhelpを表示してみます。
~$ rhino -help Usage: java org.mozilla.javascript.tools.shell.Main [options...] [files] Valid options are: -?, -help Displays help messages. -w Enable warnings. -version 100|110|120|130|140|150|160|170 Set a specific language version. -opt [-1|0-9] Set optimization level. -f script-filename Execute script file, or "-" for interactive. -e script-source Evaluate inline script. -debug Generate debug code. -strict Enable strict mode warnings. -fatal-warnings Treat warnings as errors. -encoding charset Use specified character encoding as default when reading scripts.
~$ js -help Usage: java org.mozilla.javascript.tools.shell.Main [options...] [files] Valid options are: -?, -help Displays help messages. -w Enable warnings. -version 100|110|120|130|140|150|160|170 Set a specific language version. -opt [-1|0-9] Set optimization level. -f script-filename Execute script file, or "-" for interactive. -e script-source Evaluate inline script. -debug Generate debug code. -strict Enable strict mode warnings. -fatal-warnings Treat warnings as errors. -encoding charset Use specified character encoding as default when reading scripts.
広告
お問い合わせは sweng.tips@gmail.com まで。