I didn't hit this, but I helped find an answer for someone else having problems, there is a problem with Debian and possibly distros based on Debian where java will keep erroring and thinking it has no network connectivity, thankfully someone has already posted a solution to the JOSM bug tracker:
Discussion
Comment from Gnurfos on 7 January 2010 at 20:23
Many thanks for this post !
I did not have the courage to search for a solution to this (given the quite generic error message), and stopped using JOSM for a while (actually contributing at all).
It's really amazing that a thing breaking so much can reach a popular branch, and remain for days.
Comment from JohnSmith on 7 January 2010 at 21:40
@Gnurfos it had me stumped for a bit, I'm just glad someone else solved it first :)
Comment from pavithrans on 16 March 2010 at 11:22
The problem has been there for long time in debian/ubuntu . I was suggested to use http://josm.openstreetmap.de/josm-tested.jar and run it with java . I never had problems this way . Looks like debian/ubuntu package maintainers are not that active .