Adding java check in aliasing of multiple choices.

This is needed to hack around a lack of compatibility between
ruby 2.0 and jruby compat.version=2.0.