Why is this post even here? You posted in the other thread with the exact same topic!
Yes, Java supports IPv6. Use the same old class and methods you've always used for sockets, etc. You're just able to enter an IPv6 address, if you want, if you need an IPv4, then just enter that. It does everything for you.