Ver originaltry { String hostname = InetAddress.getLocalHost().getHostName();} catch (UnknownHostException ex) { ex.printStackTrace();}