#StackBounty: #java #rhel7 #openjdk-11 InetAddress.getLocalHost().getHostName() different behavior between JDK 11 and JDK 8

Bounty: 500

I wrote a simple java program to basically run:


If I compile it and run it on Java 1.7.231 ir 1,8,221 On RHEL 7.7, it returns the FQDN (computer.domain.com), but ON THE SAME SERVER, compile it in RHEL JDK 11.0.2 it returns only the server name.

As I understand it should do a reverse DNS lookup (basically a hostname -f) but with JDK 11 the behavior is definitely different. Any idea why is this happening?

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.