Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions bin/jruby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -854,18 +854,19 @@ if $use_modules; then
process_java_opts "$jruby_module_opts_file"
fi

# Default JVM Class Data Sharing Archive (jsa) file for JVMs that support it
readonly jruby_jsa_file="$JRUBY_HOME/lib/jruby-java$java_runtime_version.jsa"
if [ -n "${JRUBY_JSA-}" ]; then
# Allow overriding default JSA file location
jruby_jsa_file="$JRUBY_JSA"
else
# Default JVM Class Data Sharing Archive (jsa) file for JVMs that support it
jruby_jsa_file="$JRUBY_HOME/lib/jruby-java$java_runtime_version.jsa"
fi
readonly jruby_jsa_file

# Find JSAs for all Java versions
assign jruby_jsa_files "$JRUBY_HOME"/lib/jruby-java*.jsa
readonly jruby_jsa_files

# Allow overriding default JSA file location
if [ -n "${JRUBY_JSA-}" ]; then
jruby_jsa_file="$JRUBY_JSA"
fi

# Ensure the AppCDS parent directory is actually writable
if dir_name "$jruby_jsa_file" && ! [ -w "$REPLY" ]; then
if $use_jsa_file || $regenerate_jsa_file || $remove_jsa_files; then
Expand Down