The solution is not far from reach, have confidence. First establish what kind of OS or simply, Operating System, your computer runs. Most new computers nowadays run a standard Windows 7 64-bit system unless you have a Macintosh, other Operating System, or older computer.
In a Windows 7 64-bit OS case you will have a Java folder under Local Disc(C:) > Program Files > Java and Local Disc(C:) > Program Files(x86) > Java. Check if you have both. If you do, click each folder and determine if you have a sub folder within usually called jre6, or jre7, if you are relatively up to date. If you have an older system, you might require an older form of Java.
First check your Recycling bin to see if your Java folder is in there. Or the sub folder, jre(x). (x being the version number) If it is in there, simply move it out of the trash and back into the directory it belongs in (This may involve opening a few files to determine if it is 64-bit or 32-bit). Restart your system and see if it works. If this solution fails or the files are not in the bin, continue to the second solution which I recommend more highly.
Two, you may have partial files, if this is the case: Go to your search bar on your start menu. Type in "Add or Remove programs", press enter. Your Control Panel will then open up with a list of programs, to narrow down the list, type "Java" into the search bar at the top right corner. Once it loads the results you should see something similar to Java(TM) 6 Update (x) (x being the version update) or Java(TM) 7 (64-bit). Right click on the one you have or both and select "Uninstall". This will remove any remaining files that may be disrupting a new installation. If this does not work, go back to your program files and delete any remaining files (Do this only as a last resort).
Once this is complete, download the Java(s) compatible with your system. http://www.java.com/en/download/manual.jsp Follow the instructions and reinstall java on your system. If you have a 64-bit system, ensure that you download and instal both the Java 32-bit and the Java 64-bit. If this does not work, I suggest you browse Oracle's FAQs to see if a solution exists, search by the error code you receive. It will be easier for you to find an answer that way. I hope this has been helpful to you and good luck!