sun.net.dns.ResolverConfiguration is marked as deprecated, but it still works
I think the only way to do this right and fix https://bugs.ruby-lang.org/issues/12604 is to reimplement this
What do you think? Should I try it or is there a better way?
A valid concern. There are builds of 11, can you try to test one of them too? That would get us working into the next LTS version of OpenJDK.