Are you saying that it worked for you when launched from the command-line? If so, then the problem is certainly with your file-type associations. Not sure what to recommend other than to reinstall Java.
"Object-oriented design is the roman numerals of computing." -- Rob Pike