Sun Java is available thru the Non-Free Repo for Squeeze, to add it you must add
deb http://ftp.us.debian.org/debian/ squeeze main non-free
to your /etc/apt/sources.list file. If I’ve never been clear about how to do that you must open the file as sudo or root in any text editor.
Once this is done you update your apt with
sudo apt-get update
Then essentially you type
apt-get install sun-java6-jdk
for the Java Dev Kit or choose sun-java6-jre if you just want the JRE for the use of Java.. I tend to pick the JDK because a few apps like it over the JRE.
Note: You can test your Java version with java -version and if you don’t get a Sun Version of Java as a reply then you need to type this:
update-alternatives --config java
and select the newly installed java which is something like…
There are 2 choices for the alternative java (providing /usr/bin/java).
Selection Path Priority Status
0 /usr/bin/gij-4.4 1044 auto mode
1 /usr/bin/gij-4.4 1044 manual mode
2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode
and in my case I chose # 2
You should be good to go now.. keep in mind this is just java..
if you want the plugin it’s
apt-get install sun-java6-plugin sun-java6-fonts