I have created ubuntu 10.04 ec2 image and now I need to install tomcat apache and jdk6 on my instance but whenever I use the command sudo apt-get install sun-java6-jdk
Ubuntu doesn't have the Sun JDKs available by default so in /etc/apt/sources.list uncomment:
deb http://archive.canonical.com/ubuntu maverick partner
deb-src http://archive.canonical.com/ubuntu maverick partner
and then:
sudo apt-get update
sudo apt-get install sun-java6-jdk
ec2-api-tools requires the multiverse lines in sources.list to be uncommented first (remember to apt-get update also).