You can download the Java Runtime Environment directly at http://java.sun.com/ or as a debian archive at http://www.debian-unofficial.org/index.html . If you're downloading the original package from Sun, this is the way how you may install it on your system:
# cd /opt/ # sh /tmp/jre-6-linux-i586.bin # ln -s jre1.6.0 jre
# update-alternatives --install /usr/bin/java java /opt/jre/bin/java 200
JAVA_HOME=/opt/jre export JAVA_HOME
# cd /tmp # tar xfz japt-proxy-1.4-standalone-bin.tar.gz
# adduser --system japt-proxy --home /dev/null --no-create-home # cp /tmp/japt-proxy-1.4/japt-proxy.sh /etc/init.d # chmod 755 /etc/init.d/japt-proxy.sh # update-rc.d japt-proxy.sh defaults # mkdir -m 0750 /var/log/japt-proxy /var/cache/japt-proxy # chown japt-proxy /var/log/japt-proxy /var/cache/japt-proxy # cp /tmp/japt-proxy-1.4/japt-proxy-1.4-standalone.jar /usr/share/java
# cp /tmp/japt-proxy-1.4/japt-proxy.conf.xml /etc
Now edit /etc/japt-proxy.conf.xml to your needs. See Configuration section for details.
# /etc/init.d/japt-proxy.sh start
See /var/log/japt-proxy.log if the server started successfully.
deb http://localhost:8080/japt-proxy/debian etch main contrib deb http://localhost:8080/japt-proxy/debian-security etch/updates main contrib
deb http://localhost:8080/japt-proxy/debian lenny main contrib deb http://localhost:8080/japt-proxy/debian-security lenny/updates main contrib
# apt-get update # apt-get upgrade
...everything is now downloaded by the proxy. You can do a tail -f /var/log/japt-proxy.log to see what the proxy is doing.