IPv6 is the new IP standard in the networking world following the shortage of IPv4 addresses. Both protocols are supported by Java. IPv4 uses 32-bit addressing while IPv6 is 128-bit.
As Oracle states: “IPv6 in Java is transparent and automatic. A port is not necessary and there is no recompilation to be done.”. In short, everything is done to be as transparent as possible and has been for several years. If you absolutely need IPv4, you can configure java.net.preferIPv4Stack to true. It is false by default.
You may also need to simply store or manipulate IPv6 addresses. To do this you can use BigInteger to convert. BigInteger is an immutable Java class which is particularly practical for handling IP addresses without risking modifying them. Of course you can convert from IPv6 to BigInteger and vice versa
Oracle overview: https://docs.oracle.com/javase/8/docs/technotes/guides/net/ipv6_guide/
Network configuration: https://docs.oracle.com/javase/7/docs/api/java/net/doc-files/net-properties.html
Tutorial for using BigInteger: https://www.javacodegeeks.com/convert-ipv6-to-biginteger-in-java.html
Health