The setting of java.net.preferIPv4Stack is handled in Java code. Setting it in the shell scripts prevents the use of IPv6 when JRuby is launched via those shell scripts.
(My earlier pull request mistakenly targeted the master branch. This correct targets the jruby-1_7 branch).
Don't set java.net.preferIPv4Stack in shell scripts #1286
thanks for digging into this