jjs(1) | 基本ツール | jjs(1) |
名前
jjs - Nashornエンジンを呼び出します。
概要
jjs [options] [script-files] [-- arguments]
options
script-files
arguments
説明
jjsコマンド行ツールを使用してNashornエンジンを呼び出します。これを使用して、1つまたは複数のスクリプト・ファイルを解釈したり、対話型シェルを実行することができます。
オプション
jjsコマンドのオプションはスクリプトがNashornによって解釈される条件を制御します。
-ccs=size
--class-cache-size=size
-css=100 -css=1k
-co
--compile-only
-cp path
-classpath path
-Dname=value
>> jjs -DmyKey=myValue jjs> java.lang.System.getProperty("myKey") myValue jjs>
-d=path
--dump-debug-dir=path
--debug-lines
--debug-locals
-doe
--dump-on-error
--early-lvalue-error
--empty-statements
-fv
--fullversion
--function-statement-error
--function-statement-warning
-fx
-h
-help
-Joption
>> jjs -J-Xmx4g jjs> java.lang.Runtime.getRuntime().maxMemory() 3817799680 jjs>
--language=[es5]
--lazy-compilation
--loader-per-compile
--log=subsystem:level
--log=fields:finest,codegen:info
--optimistic-types=[true|false]
--package=name
--parse-only
--print-ast
--print-code
--print-lower-ast
--print-lower-parse
--print-no-newline
--print-parse
--print-symbols
-pcs
--profile-callsites
-scripting
--stderr=filename|stream|tty
--stdout=filename|stream|tty
-strict
-t=zone
-timezone=zone
-tcs=parameter
--trace-callsites=parameter
miss
enterexit
objects
--verify-code
-v
-version
-xhelp
例
例 1 Nashornを使用したスクリプトの実行
jjs script.js
例 2 対話型モードでのNashornの実行
>> jjs jjs> println("Hello, World!") Hello, World! jjs> quit() >>
例 3 Nashornへの引数の渡し
>> jjs -- a b c jjs> arguments.join(", ") a, b, c jjs>
関連項目
jrunscript
2015年3月3日 | JDK 8 |