add the following line to /etc/sources.list
Code:
deb http://snapshot.debian.org/archive/debian/20070724T000000Z testing main non-free
you should be able to install java 1.5 after updating apt.
remember to remove the apt line once you've installed java 1.5
or
have a look
here
I was once in a similar situation and thats how i managed to find the Debian Snapshot Server's URL. Hit & Trial really.
P.S.: There maybe a better way to do this, please let me and the others here know if you know it