You may be out of luck, we're dependant on Apple for Java, & there are no more Java updates for 10.5.8
Locate the version of Java that’s installed on your Mac OS X system.
1. Open the Utilities folder and run the Terminal application.
2. Type java -version and press Enter.
(space between java & -v important)
The version of Java that you have installed will then be displayed on the screen.
So we know more about it...
At the Apple Icon at top left>About this Mac, then click on More Info, then click on Hardware> and report this upto but not including the Serial#...
Model Name: iMac
Model Identifier: iMac7,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 4 MB
Memory: 6 GB
Bus Speed: 800 MHz
Boot ROM Version: IM71.007A.B03
SMC Version (system): 1.21f4
You have the lastest version for 10.5.8 & PPC & 32 bit IntelMacs Macs...
Java for Mac OS X 10.5 Update 10 delivers improved compatibility, security, and reliability by updating J2SE 5.0 to 1.5.0_30, and updating Java SE 6 to 1.6.0_26 for 64-bit capable Intel-based Macs.