According to this post there are several ways to configure a custom host resolver in Java, but each of these ways differs from the other and does not work for all java versions between 8 and the most recent.
The post indicated above is 10 years old: does anyone know if in this period a solution has been found that works for all the java versions mentioned above? If so, does anyone have an example code?