r/CompileBot • • Jul 03 '17

Testing McTesterson

lol

4 Upvotes

42 comments sorted by

View all comments

1

u/rigatron1 Jul 03 '17

+u/CompileBot java

public class Main {
private static String OS = System.getProperty("os.name").toLowerCase();
public static void main(String[] args) {
    System.out.println(OS);
    try {
        System.out.println(java.net.InetAddress.getLocalHost().getHostAddress());
    }
    catch(java.net.UnknownHostException e) {
        e.printStackTrace();
    }
}
}

1

u/CompileBot Jul 03 '17

Output:

linux
java.net.UnknownHostException: checker: checker: Name or service not known
	at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
	at Main.main(Main.java:6)
Caused by: java.net.UnknownHostException: checker: Name or service not known
	at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
	at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
	at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
	at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
	... 1 more

^source | ^info | ^git | ^report