Sun JRE is available in the non-free repository. You need to update your repositories configuration file (/etc/apt/sources.list).
Add the following line:
deb http://ftp.us.debian.org/debian/ etch main contrib non-free
Update apt with apt-get update command and you’re ready to install the JRE.
$ apt-get install sun-java5-jre
Check your java binary:
$ java -version java version "1.5.0_14" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_14-b03) Java HotSpot(TM) Client VM (build 1.5.0_14-b03, mixed mode, sharing)