I have managed to get Matlab to now run on Windows 8. These are the steps:
1. I downloaded Java SE Development Kit 6u31 from the oracle website and installed it.
2. I went to C:\Program Files (x86)\Java (directory could be different for other people) and copied the jre6 folder.
3. I went to C:\Program Files (x86)\MATLAB\R2006b\sys\java\jre\win32 (could be different for some). You should find 2 files here. A .gcf and a folder jre1.5 (or something). Delete the folder and replace it with what you copied from the Java directory.
4. Open the .gcf as a text file and edit it to the number at the end of the folder name i.e. 6 in my case for jre6.
This worked for me. If you get an error saving cannot find jvm file. Go back into the jre6 folder you placed in the matlab directory and check does it have the "client folder". If it does not you need to download a different version of java with the client folder as this contains the correct jvm file.