This error usually happens if there is a conflict in the Java installations. It means there may be more than one installation of Java in your system. Mostly presence of Oracle Jinitiator in C:\Program Files (x86)\Oracle creates this problem.
Perhaps your file associations got messed up. At the command prompt, try running
ftype | find "jarfile"
On my 64-bit Windows 7 computer, that shows
jarfile="C:\Program Files (x86)\Java\jre6\bin\javaw.exe" -jar "%1" %*
You can also change it with
ftype:
ftype jarfile="C:\Program Files (x86)\Java\jre6\bin\javaw.exe" -jar "%1" %*
and reboot the system.
You may also uninstall the Jinitiator which is no longer supported by Oracle as per our knowledge.