how to add java on Ubuntu 12.10 x64 Desktop

Posted July 11, 2013 3k views
i have found a way with the command sudo? add-apt-repository ppa:webupd8team/java but when i type this it says add-apt-repository: command not found can any one please help me.?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
5 answers
If you need to add a repository to download it through apt-get, edit your "/etc/apt/sources.list" file and add something like "deb repository_name" to the beginning of that file, e.g. with "sudo nano /etc/apt/sources.list".

Then do apt-get update.
i`m a big newbie to this VPS world can you please explain me in smaller details and in full codes please if you will manage to help me i will give you cookies!
like can you explain in step by step what i need to do please
As provided by pipework in the chat:
You have to install the software-properties-common package to be able to use the add-apt-repository command.