0

This question already has an answer here:

I installed Java 7 and 8 using ppa:webupd8 and my terminal says it is installed, but when trying to run minecraft it says

This application requires a Java Runtime Environment 1.7.0

I'm not the best with Ubuntu and I really can't figure out what the problem is. Any help is appreciated.

enter image description here

marked as duplicate by muru, Eric Carvalho, Pilot6, David Foerster, Aaron Mar 23 '16 at 13:38

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0
  1. By default open-jdk is used in ubuntu, cause for your issue might be not setting up environment variable for java or still ubuntu is using open-jdk.
  2. for that run this command in your terminal sudo update-alternatives --config java
  3. you will get options to select which version of java to use,make sure you select the oracle java 7/8
  4. if that doesn't work start setting up variables as follows:

    sudo -H gedit   /etc/profile
    JAVA_HOME=/usr/lib/jvm/jdk1.7.0
    PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
    export JAVA_HOME 
    export JRE_HOME 
    export PATH
    
-1

sudo apt-get install open-jdk, This command from Terminal will remove the OpenJDK and set Java as default, If that doesn't work, Update your Java 8.

Not the answer you're looking for? Browse other questions tagged or ask your own question.