0
sudo add-apt-repository ppa:ferramroberto/java

After this command I am getting error:

Error reading https://launchpad.net/api/1.0/~ferramroberto/+archive/java: Couldn't resolve host 'launchpad.net
2
  • What's your output for ping launchpad.net?
    – pzkpfw
    May 16, 2013 at 7:00
  • ppa:ferramroberto - in not a good repository May 16, 2013 at 7:18

1 Answer 1

1
  1. To add our PPA and install the latest Oracle Java (JDK) 7 in Ubuntu, use the commands below:

    sudo add-apt-repository ppa:webupd8team/java
    
    sudo apt-get update && sudo apt-get install oracle-jdk7-installer
    
  2. After the installation you have enable the jdk:

    update-alternatives –display java
    
  3. Check if Ubuntu uses Java JDK 7

    java -version
    

    The correct answer should be like this:

    javac 1.7.0_07
    
  4. Adding JAVA_HOME to environment

    Edit the file /etc/environment and add JAVA_HOME=/usr/lib/jvm/java-7-oracle to the end of the file.

    First open a Terminal (Applications → Accessories → Terminal), then enter:

    sudo gedit /etc/environment
    

Not the answer you're looking for? Browse other questions tagged .