To install the Java Development Package (1.5.0.x) I did the following.
I added multiverse to my repository settings (the following are valid for Internode customers only.
deb ftp://mirror.internode.on.net/pub/ubuntu/ubuntu/ hoary main restricted universe multiverse
deb-src ftp://mirror.internode.on.net/pub/ubuntu/ubuntu/ hoary main restricted universe multiverse
deb ftp://mirror.internode.on.net/pub/ubuntu/ubuntu/ hoary-updates main restricted universe multiverse
deb-src ftp://mirror.internode.on.net/pub/ubuntu/ubuntu/ hoary-updates main restricted universe multiverse
deb ftp://mirror.internode.on.net/pub/ubuntu/ubuntu/ hoary-security main restricted universe multiverse
deb-src [...]