1st do a safe boot & repair permissions; (1)
Mac OS X: Starting up in Safe Mode; & then (2)
Disk Utility's Repair Disk Permissions. Then reboot normally. If you have the latest Java 1.5 then you may not need to change the Java preferences because it automatically becomes default. But worth checking anyway;
Setting up Java 1.5
I can't give you a link to reinstalling Java because it really depends upon whether you're using an intel mac or a powermac G3-5. And I'm not sure which Java would be best to reinstall.
Try opening FrostWire after repairing permissions & rebooting normally.