It could be caused by your computer going into standby or hibernation mode. You could experiment a little to find out. Go to your Control Panel > Performance and Maintenance > Power Options, and try setting them to never and see if it helps. To narrow it down just do one at a time.
Doesn't really sound like java but you could try the fixes in this thread:
Fixes for Limewire when LW isn't operating as it should!