whew--your situation is really odd. Sounds like your OS X really is messed up. What version are you using, and what machine? (forum rules list all the typical info needed to help troubleshoot).
Time for a safe boot at least (instructions are in the stickies or search).
Java is part of the System/Library, but Iwouldn't toch any of the files there