Since currently Sun Java 5.x jre package is directly available in Debian repository, the following is only for installing jdk.