Last updated January 18, 2011 04:57, by qmxme
Feedicon  
[[Home|&raquo; JRuby Project Wiki Home Page]] <h1>JRuby Options</h1> __TOC__ == Information == === Version Info === * scope: per runtime * description: JRuby/Ruby versions currently supported * property: none * default: false * command line: -v or --version * embed: ScriptingContainer.getSupportedRubyVersion() * JSR223: ScriptEngineFactory.getLanguageVersion() === Help === * scope: per runtime * description: Shows usage and command line options * property: none * default: false * command line: --help * embed: none * JSR223: none === System Property List === * scope: per runtime * description: List all configuration Java properties (pass -J-Dproperty==value) * property: none * default: false * command line: --properties * embed: none * JSR223: none === Copyright === * scope: per runtime * description: Swiching on/off to show the copyright * property: none * default: false * command line: --copyright * embed: none *JSR223: none == Directory == === JRuby Home === * scope: per runtime * description: JRuby home directory. The base path to load libraries. * property: jruby.home=<path to jruby home> * default: jruby.home system property, java.io.tmp system property or JRUBY_HOME environment variable(embed only) * command line: none * embed: ScriptingContainer.get/setHomeDirectory() * JSR223: System.setProperty("jruby.home", <path to jruby home>) === Load Path === * scope: per runtime * description: Directory/file paths to load libraries or Ruby files. $LOAD_PATH directory (may be used more than once) * property: java.class.path or org.jruby.embed.class.path(embed and JSR223) * default: none * command line: -Idirectory * embed: ScriptingContainer.get/setLoadPaths() * JSR223: System.setProperty("org.jruby.embed.class.path", <path string>) === Current Directory === * scope: per runtime * description: The current directory to execute scripts. JRuby changes a directory to the specified directory before executing. * property: user.dir = <path to current directory> * default: user.dir system property * command line: -Cdirectory * embed: ScriptingContainer.get/setLoadPaths() * JSR223: System.setProperty("user.dir", <path to some directory>) == Version == === Compat Version === * scope: per runtime * description: The major Ruby version to be compatible with * property: jruby.compat.version==RUBY1_8|RUBY1_9 / org.jruby.embed.compat.version (JSR223) * default: RUBY1_8 * command line: --1.8|--1.9 or –compat RUBY1_8 | RUBY1_9 * embed: ScriptingContainer.get/setCompatVersion() *JSR223: System.setProperty("org.jruby.embed.compat.version", ruby1_9) === Bytecode Version === * scope: VM wide * description: Sets bytecode version for JRuby to generate. * property: jruby.bytecode.version==1.5|1.6 * default: current JVM version (java.specification.version system property) * command line: none * embed: none * JSR223: none == Customization == === Local Context Model (embed only) === * scope: per runtime * description: Specifies a local context model of Ruby runtime. * property: org.jruby.embed.localcontext.scope (JSR223) * default: singleton * command line: none * embed: constructor argument of ScriptingContainer * JSR223: System.setProperty("org.jruby.embed.localcontext.scope", &lt;singleton, singlethread, or threadsafe&gt;) === Local Variable Behavior (embed only) === * scope: per runtime * description: Specifies a local variable behavior for sharing them between Java and Ruby * property:org.jruby.embed.localvariable.behavior (JSR223) * default: transient for ScriptingContainer, global for JSR223 * command line: none * embed: constructor argument of ScriptingContainer * JSR223: System.setProperty("org.jruby.embed.localvariable.behavior", &lt;transient, persistent, or global&gt;) === Lazy Variable Retrieval (embed only) === * scope: per runtime * description: Specifies type of variable retrieval from Ruby runtime to use in Java * property: org.jruby.embed.laziness (JSR223) * default: true for ScriptingContainer, false for JSR223 * command line: none * embed: constructor argument of ScriptingContainer * JSR223: System.setProperty("org.jruby.embed.laziness", &lt;true or false&gt;) === Class Loader (embed only) === * scope: per runtime * description: Specifies a classloader to load libraries and Ruby files * property: org.jruby.embed.classloader (JSR223) * default: Thread.currentThread().getContextClassLoader() * command line: none * embed: ScriptingContainer.get/setClassLoader() * JSR223: System.setProperty("org.jruby.embed.classloader", &lt;current or none&gt;) === Standard Input === * scope: per runtime * description: Specifies standard input ($STDIN/$stdin) * property: none * default: java.lang.System.in * command line: none * embed: ScriptingContainer.get/setInput() or get/setReader() * JSR223: ScriptContext.get/setReader() === Standard Output === * scope: per runtime * description: Specifies standard input ($STDOUT/$stdout) * property: none * default: java.lang.System.out * command line: none * embed: ScriptingContainer.get/setOutput() or get/setWriter() * JSR223: ScriptContext.get/setWriter() === Standard Error === * scope: per runtime * description: Specifies standard input ($STDERR/$stderr) * property: none * default: java.lang.System.err * command line: none * embed: ScriptingContainer.get/setError() or get/setErrorWriter() * JSR223: ScriptContext.get/setErrorWriter() === Argument List === * scope: per runtime * description: Specifies a Argument List ($ARGV) * property: none * default: empty array * command line: args * embed: ScriptingContainer.get/setArgv() * JSR223: Bindings.put(ScriptEngine.ARGV, <array of args>) or ScriptEngine.put(ScriptEngine.ARGV, <array of args>) === ObjectSpace === * scope: per runtime * description: Switches the value to run with ObjectSpace enabled/disabled (default; improves performance) * property: jruby.objectspace.enabled == true | false * default: false * command line: -X-O (disable) / -X==O (enable) * embed: ScriptingContainer.is/setObjectSpaceEnabled() * JSR223: none === Run In Process === * scope: per runtime * description: Sets in-process launching of e.g. system('ruby ...'). * property: jruby.launch.inproc == true | false * default: true * command line: none * embed: ScriptingContainer.is/setRunRubyInProcess() * JSR223: none === Environment === * scope: per runtime * description: Sets a map of key-value pairs of environment variables * property: none * default: empty map * command line: none * embed: ScriptingContainer.get/setEnvironment() * JSR223: none === Script Filename === * scope: per runtime * description: Sets a script filename to be executed * property: none * default: given filename or “&lt;script&gt;” if the filename is not set(embed) * command line: -S &lt;filename&gt; * embed: ScriptingContainer.get/seScriptFilename() * JSR223: ScriptContext.setAttribute(ScriptEngine.FILENAME, &lt;filename&gt;) === Load Service Creator === * scope: per runtime * description: Specifies a LoadServiceCreator to load LoadService for libraries * property: none * default: LoadServiceCreator.DEFAULT * command line: none * embed: ScriptingContainer.get/setLoadServiceCreator() * JSR223: none === Profile === * scope: per runtime * description: Specifies a restricted subset of code to be loaded during the runtime initialization * property: none * default: Profile.DEFAULT * command line: none * embed: ScriptingContainer.get/setProfile() * JSR223: none === Class Cache === * scope: per runtime * description: Specifies a class cache object * property: none * default: ClassCache object with default classloader and jitMax * command line: none * embed: ScriptingContainer.get/setClassCache() * JSR223: none === Record Separator === * scope: per runtime * description: Specifies record separator (\\0, if no argument) * property: none * default: false * command line: -0[octal] * embed: ScriptingContainer.get/setRecordSeparator() * JSR223: none === KCode === * scope: per runtime * description: specifies code-set (e.g. -Ku for Unicode, -Ke for EUC and -Ks for SJIS) * property: none * default: KCode.NONE * command line: -Kkcode * embed: ScriptingContainer.get/setKCode() * JSR223: none === Autosplit === * scope: per runtime * description: Turns on autosplit mode with -n or -p (splits $_ into $F) * property: none * default: false * command line: -a * embed: none * JSR223: none === Autosplit Pattern === * scope: per runtime * description: Specifies split() pattern for autosplit (-a) * property: none * default: false * command line: -Fpattern * embed: none * JSR223: none === Assume Loop === * scope: per runtime * description: Assumes 'while gets(); ... end' loop around your script * property: no * default: false * command line: -n * embed: no === Assume Printing === * scope: per runtime * description: Assumes loop like -n but print line also like sed * property: none * default: false * command line: -p * embed: none * JSR223: none === Process Line Ends === * scope: per runtime * description: Enables line ending processing * property: none * default: false * command line: -l * embed: none * JSR223: none === Line Number (embed only) === * scope: per evaluation * description: Specifies an offset of line numbers show up in error message * property: org.jruby.embed.linenumber (JSR223) * default: 0 * command line: none * embed: argument of ScriptingContainer.parse() * JSR223: System.setProperty("org.jruby.embed.linenumber", &lt;number&gt;) === Sharing Variable Switch (embed only) === * scope: per evaluation * description: Set on/off sharing variables feature * property: org.jruby.embed.sharing.variables (JSR223) * default: true * command line: none * embed: ScirptingContainer.setAttribute(AttributeName.SHARING_VARIABLES, &lt;true or false&gt;) * JSR223: System.setProperty("org.jruby.embed.sharing.variables", &lt;true or false&gt;) === Termination (embed only) === * scope: per evaluation * description: Executes termination * property: org.jruby.embed.termination (JSR223) * default: off * command line: none * embed: ScirptingContainer.terminate() * JSR223: System.setProperty("org.jruby.embed.termination", <true or false>) === Receiver Object (embed only) === * scope: per evaluation * description: Specifies a receiver object to get/put/remove variables. * property: org.jruby.embed.receiver (JSR223) * default: off * command line: none * embed: argument of ScirptingContainer.get()/put()/remove() * JSR223: System.setProperty("org.jruby.embed.receiver", &lt;receiver object&gt;) == JIT settings == === JIT Threshold === * scope: per runtime * description: Sets JIT threshold to the specified method invocation count. * property: jruby.jit.threshold == &lt;invocation count&gt; * default: JIT_THRESHOLD (50) * command line: none * embed: ScriptingContainer.get/setJitThreshold() * JSR223: none === JIT Max === * scope: per runtime * description: Sets the max count of active methods eligible for JIT-compilation. * property: jruby.jit.max==&lt;method count&gt; * default: JIT_MAX_METHODS_LIMIT (4096) per runtime. A value of 0 disables JIT, -1 disables max. * command line: none * embed: ScriptingContainer.get/setJitMax() * JSR223: none === JIT Max Size === * scope: per runtime * description: Sets the maximum full-class byte size allowed for jitted methods. * property: jruby.jit.maxsize==&lt;jitted method size (full .class)&gt; * default: Integer.MAX_VALUE * command line: none * embed: ScriptingContainer.get/setJitMaxSize() * JSR223: none === JIT Logging === * scope: per runtime * description: Enables JIT logging (reports successful compilation). * property: jruby.jit.logging == true | false * default: false * command line: none * embed: none * JSR223: none === JIT Logging Verbose === * scope: per runtime * description: Enables verbose JIT logging (reports failed compilation). * property: jruby.jit.logging.verbose==true|false * default: false * command line: none * embed: System.setProperty("jruby.jit.logging.verbose", <true or false>) * JSR223: System.setProperty("jruby.jit.logging.verbose", <true or false>) === JIT Logging Frequency === * scope: per runtime * description: Sets an interval to log a message every n methods JIT compiled. * property: jruby.jit.logEvery==&lt;method count&gt; * default: 0 (off) * command line: none * embed: ScriptingContainer.get/setJitLogEvery() * JSR223: none === JIT Compile Exclude === * scope: VM wide * description: Excludes methods from JIT by class/module short name, c/m::method_name, or -::method_name for anon/singleton classes/modules. Comma-delimited. * property: jruby.jit.exclude==&lt;ClsOrMod,ClsOrMod::method_name,-::method_name&gt; * default: null * command line: none * embed: none *JSR223: none === JIT Compile Exclude === * scope: VM wide * description: Caches jitted method in-memory bodies across runtimes and loads. * property: jruby.jit.cache==true|false * default: true * command line: none * embed: none *JSR223: none == Logging/ Debugging == === Benchmark === * scope: per runtime * description: benchmark mode, times the script execution * property: none * default: false * command line: -b * embed: none *JSR223: none === Debug Flag === * scope: per runtime * description: Sets debugging flag ($DEBUG) * property: none * default: false * command line: -d or --jdb * embed: none * JSR223: none === Syntax Check === * scope: per runtime * description: Checks syntax only * property: none * default: false * command line: -c * embed: none * JSR223: none === Parser Debug === * scope: per runtime * description: Enables parsing debug output * property: none * default: false * command line: -y * embed: none * JSR223: none === Bytecode Info === * scope: per runtime * description: Switches to show the JVM bytecode produced by compiling specified code * property: none * default: false * command line: --bytecode * embed: none * JSR223: none === DEBUG_LOAD_SERVICE === * scope: VM wide * description: LoadService logging * property: jruby.debug.loadService==true|false * default: false * command line: none * embed: none * JSR223: none === DEBUG_LOAD_TIMINGS === * scope: VM wide * description: Print load timings for each require'd library. * property: jruby.debug.loadService.timing==true|false * default: false * command line: none * embed: none * JSR223: none === DEBUG_LAUNCHING === * scope: VM wide * description: Sets shellLauncher logging. * property: jruby.debug.launch==true|false * default: false * command line: none * embed: none * JSR223: none === FULL_TRACE_ENABLED === * scope: VM wide * description: Sets the execution mode most suitable for debugger functionality, which is whether full traces are enabled (c-call/c-return) or not. * property: jruby.debug.fullTrace==true|false * default: false * command line: --debug * embed: none * JSR223: none === REFLECTED_HANDLES === * scope: VM wide * description: Sets the flag to use reflection for binding methods, not generated bytecode. * property: jruby.reflected.handles==true|false * default: false * command line: none * embed: none * JSR223: none == Compiler == === Compilation Mode === * scope: per runtime * description: Sets runtime compilation mode * property: jruby.compile.mode == JIT | FORCE | OFF / org.jruby.embed.compilemode (JSR223) * default: OFF(embed), FORCE(--fast option), JIT(otherwise) * command line: -X-C(off), -X==C(force) * embed: ScriptingContainer.get/setCompileMode() * JSR223: System.setProperty("org.jruby.embed.compilemode", <jit or force>) === CHAINED_COMPILE_LINE_COUNT === * scope: VM wide * description: Sets the number of lines at which compiled bodies are \"chained\". * property: jruby.compile.chainsize == &lt;line count&gt; * default: CHAINED_COMPILE_LINE_COUNT_DEFAULT (500) * command line: none * embed: none * JSR223: none === PEEPHOLE_OPTZ === * scope: VM wide * description: Enables or disables peephole optimizations. * property: jruby.compile.peephole == true | false * default: true (on) * command line: none * embed: none * JSR223: none === FASTEST_COMPILE_ENABLED === * scope: VM wide * description: (EXPERIMENTAL) Turns on all experimental compiler optimizations * property: jruby.compile.fastest == true | false * default: false * command line: --fast * embed: none * JSR223: none === FASTOPS_COMPILE_ENABLED === * scope: VM wide * description: (EXPERIMENTAL) Turn on fast operators for Fixnum. * property: jruby.compile.fastops == true | false * default: FASTEST_COMPILE_ENABLED (false) * command line: --fast * embed: none * JSR223: none === FRAMELESS_COMPILE_ENABLED === * scope: VM wide * description: (EXPERIMENTAL) Turn on frameless compilation where possible * property: jruby.compile.frameless == true | false * default: FASTEST_COMPILE_ENABLED (false) * command line: --fast * embed: none * JSR223: none === POSITIONLESS_COMPILE_ENABLED === * scope: VM wide * description: (EXPERIMENTAL) Turns on compilation that avoids updating Ruby position info. * property: jruby.compile.positionless == true | false * default: FASTEST_COMPILE_ENABLED (false) * command line: --fast * embed: none * JSR223: none === THREADLESS_COMPILE_ENABLED === * scope: VM wide * description: (EXPERIMENTAL) Turns on compilation without polling for \"unsafe\" thread events. * property: jruby.compile.threadless == true | false * default: FASTEST_COMPILE_ENABLED (false) * command line: none * embed: none * JSR223: none === FASTCASE_COMPILE_ENABLED === * scope: VM wide * description: (EXPERIMENTAL) Turn on fast case/when for all-Fixnum whens. * property: jruby.compile.fastcase == true | false * default: false * command line: --fast * embed: none * JSR223: none === FASTSEND_COMPILE_ENABLED === * scope: VM wide * description: * property: jruby.compile.fastsend == true | false * default: false * command line: --fast * embed: none * JSR223: none === LAZYHANDLES_COMPILE === * scope: VM wide * description: Generates method bindings (handles) for compiled methods lazily. * property: jruby.compile.lazyHandles == true | false * default: false * command line: none * embed: none * JSR223: none === INLINE_DYNCALL_ENABLED === * scope: VM wide * description: * property name: jruby.compile.inlineDyncalls * default: FASTEST_COMPILE_ENABLED (false) * command line: --fast * embed: none * JSR223: none == Native Support == === Native Enable === * scope: VM wide * description: Enables/disables native extensions (like JNA for non-Java APIs * property: jruby.native.enabled == true | false * default: true * command line: none * embed: none * JSR223: none === Native Verbose === * scope: VM wide * description: Enables verbose logging of native extension loading. * property: jruby.native.verbose== true | false * default: false * command line: none * embed: none * JSR223: none === FORK_ENABLED === * scope: VM wide * description: (EXPERIMENTAL, maybe dangerous) Enables fork(2) on platforms that support it. * property: jruby.fork.enabled == true | false * default: false * command line: none * embed: none * JSR223: none == Thread pooling == === POOLING_ENABLED === * scope: VM wide * description: Enables reuse of native backing threads via a thread pool. * property: jruby.thread.pool.enabled == true | false * default: false * command line: none * embed: none * JSR223: none === POOL_MAX === * scope: VM wide * description: Sets the maximum number of threads to allow in the pool. * property: jruby.thread.pool.max == &lt;max thread count&gt; * default: Integer.MAX_VALUE * command line: none * embed: none * JSR223: none === POOL_MIN === * scope: VM wide * description: Sets the minimum number of threads to keep alive in the pool. * property: jruby.thread.pool.min == &lt;min thread count&gt; * default: 0 * command line: none * embed: none * JSR223: none === POOL_TTL === * scope: VM wide * description: Sets the maximum number of seconds to keep alive an idle thread. * property: jruby.thread.pool.ttl == &lt;time to live, in seconds&gt; * default: 60 * command line: none * embed: none * JSR223: none
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2014, Oracle Corporation and/or its affiliates
(revision 20160708.bf2ac18)
 
 
Close
loading
Please Confirm
Close