I had Java 8 installed from Oracle under Yosemite and upgraded to El Capitan. If you haven't had it installed, you may try installing it first (be aware, though, that Oracle now ships it with adware, so you may want to look for instructions on how to install it without adware, first (IIRC the trick was downloading the .tar.gz file instead of the dmg file, but better look it up if you need it)).
Now this worked for me:
1) boot from the Recovery Parition (hold down Cmd+R while booting)
2) use Disk Utility to mount the El Capitan system partition
3) use Terminal.app to create two folders:
mkdir
-p /Volumes/[Name of volume]
/System/Library/Java/JavaVirtualMachines/1
.6.0.jdk
mkdir
-p /Volumes/[Name of volume]
/System/Library/Java/Support/Deploy
.bundle
4) Unmount the volume (just to be sure)
umount /Volumes/[Name of volume]
5) Reboot and now Illustrator CS3 works as it did under Yosemite