EDIT: So I have just read a forum post about Java 6 in OS X 10. 5 being only 64-bit, whereas Safari is only 32 bit so you can only run 64-bit Java apps as standalone, not as web applets. I don't know enough about computers to know if this could be my problem?

Theres loads of posts on all different forums about java errors and how to solve them however, i have read loads of them and none of the solutions have worked for me!

When trying to access a chat room which i go on regularly, last night it instead showed a white box which said "Error. Click for details". I tried to access a java games website and the same thing happens so it is not limited to the chat room.

On clicking for details this window appears:
"There was an error while executing the application. Please click 'details' for more information"

..and on clicking for details again i get this:

Java Plug-in 1.5.0_30
Using JRE version 1.5.0_30-b03-389-9M3425 Java HotSpot(TM) Client VM
User home directory = /Users/home2
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

I tried several times over the course of last night and this morning, sometimes a different error appeared mentioning an error with java console but most of the time it shows the one above.
I last accessed the chat room the previous night and the laptop was not used in the 24 hours in between so i have no idea what could have gone wrong.

I have tried:
- Ensuring java and java plugins are enabled in Safari
- Disabling and re-enabling them
- Emptying cache and clearing cookies
- Accessing java sites using Firefox and Chrome
- Resetting PRAM
- Taking out battery, holding power button for 5 seconds then switching on again
- Ensuring software is up to date
- Tested my java status on the java website (says it is working)

I do not know what else to do?

I am using a white, early-2008 model Macbook which I have had for approx. 3 years now.
It is running Leopard 10.5.8

My computer has been very slow running and had safari crashing a lot recently.

I have had the Snow Leopard upgrade disc for a while and decided last night in desperation to finally install it in the hope it might fix things...unfortunately, i also have a dodgy disk drive which spins disks noisily for a while before spitting them out. I gave it a go anyway and the install time showed up as 4 hours 36 mins (!!!) It ran for about an hour before it stopped due to an error reading the disk.

I am upgrading to a macbook pro over the summer after mountain lion release therefore i do not really want to spend too much money fixing the optical drive or anything else on this macbook.

Any help or advice is greatly appreciated.