Search code examples
java-8cloud9-ide

Installing Java 8 on cloud9


I'm trying to install java 8 on cloud9 through the webupd8 PPA. So I'm adding the repository

sudo add-apt-repository ppa:webupd8team/java

Next I do the update and finally when I run the command

sudo apt-get install oracle-java8-installer

I get the error

E: Unable to locate package oracle-java8-installer

Any ideas how can I get through that and istall java 8 on cloud9?


Solution

  • Add the two following lines to your file /etc/apt/sources.list (which you can create if it does not exist)

    deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
    deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
    

    Then run sudo apt-get update, and you should be able to install oracle-java8-installer.

    This basically does the add-apt-repository manually. I suspect the issue is due to the fact that the default source files /etc/apt/sources.list.d/* are mounted as read-only (see for instance this topic on Cloud9 community)