| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
JRuby allows passing JVM options at the command line using the -J<javaoption> flag. Because these options may be quite verbose, may differ between applications and environments, and may encode important configuration details for a given app, we now support (in JRuby 9.2.9 and higher) a .jruby.java_opts file.
Java 9 introduced support for command-line argument files, which allows you to aggregate JVM options in a file and include those options on the command line with the syntax @<filename> rather than passing them directly. JRuby builds on this feature and supports it on Java 8 via our .jruby.java_opts files.
The format of .jruby.java_opts is as documented in the Java documentation above, with options separated by whitespace (spaces, tabs, newlines, etc) or enclosed in quotes to preserve spaces.
On startup, JRuby will look for .jruby.java_opts files in the following locations:
Options passed through JRuby to the JVM via different mechanisms will override each other. Given options are processed in the following order, with later options overriding earlier ones:
An example file, used by JRuby's --dev flag, can be found in the JRuby install under bin/.dev_mode.java_opts.
In order to help users understand where options are coming from, and to inspect the eventual set of JRuby and Java options being used, we added in 9.2.10 the --environment flag. See Environment Flag for more information.
| Back | FazBrowse Home | New Git URL |