solve erro uml ERROR: unable to get localhost information

When executing argouml

./argouml.sh 
log4j:WARN No such property [follow] in org.apache.log4j.ConsoleAppender.
ERROR: unable to get localhost information.
java.net.UnknownHostException: localhost.localdomain: localhost.localdomain
	at java.net.InetAddress.getLocalHost(InetAddress.java:1461)
	at org.argouml.application.Main.checkHostsFile(Main.java:639)
	at org.argouml.application.Main.initPreinitialize(Main.java:289)
	at org.argouml.application.Main.main(Main.java:165)
On Unix systems this usually indicates thatyour /etc/hosts file is incorrectly setup.
Stopping execution of ArgoUML.

My hostname is localhost.localdomain, see:

$ hostname 
localhost.localdomain

And got ip 192.168.1.6

$ ifconfig | grep 192
          Direc. inet:192.168.1.6  Difus.:192.168.1.255  Másc:255.255.255.0

So I added this line to /etc/hosts
192.168.1.6 localhost.localdomain

And argouml worked

Leave a Reply

Your email address will not be published. Required fields are marked *