All pastes #935279 Raw Edit

Someone

public text v1 · immutable
·published 2008-03-09 14:54 UTC
rendered paste body
on linux:

    public static void main(String[] args) throws UnknownHostException
    {
        InetAddress myHost=InetAddress.getLocalHost();
        System.out.println(myHost.getHostName());
        System.out.println(myHost.getHostAddress());
        
    }

run:
Exception in thread "main" java.net.UnknownHostException: linuxas-desktop: linuxas-desktop
        at java.net.InetAddress.getLocalHost(InetAddress.java:1353)
        at testing.Main.main(Main.java:14)
Java Result: 1

On windows runs correctly.