Here's my guess.
When you use sudo, you're passing root's path to the LimeWire installer. Root's path may be different than your user's path. Just because Java is in your user's path doesn't mean it's in root's path.
So, try becoming root (with su), checking your path, manually adding the appropriate Java directories if they're missing, and then running the install script.
to manually add the directories:
PATH = "$PATH:/usr/java/jre1.5.0_02:/usr/java/jre1.5.0_02/bin"
export PATH |