First try to uninstall and then reinstall Java (in hopes it resets the file associations)
If still not working try pressing Windows Key + R and paste "Control Panel\Programs\Default Programs\Set Associations"
Set it to java.exe
not javaw.exe
(Can't remember which one runs java but it's worth a shot.
Even if that doesn't work try a System Restore point from before the associations. (Make one before you restore incase you need to revert)
If that still doesn't work check this article out: http://www.sevenforums.com/tutorials/19449-default-file-type-associations-restore.html
or other tutorials from the internet. Please backup before making changes if something goes wrong (system restore point)