Here youve got a comprehensive guide of installing Java on Debian GNU/Linux and enabling it on Firefox.
Read it in this blog
First of all get the JDK package from java.sun.com. File name should look like jdk-[version]-linux-[architecture].bin. While its downloading edit your /etc/apt/sources.list and add contrib non-free repositories.