0

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

muru
  • 197,895
  • 55
  • 485
  • 740
  • 5
    Minecraft.link? If you're using Wine to run Minecraft, you'll have to install Java for Wine. Or see http://askubuntu.com/questions/5558/how-can-i-install-minecraft – muru Mar 20 '16 at 09:47
  • 1
    Please just paste the codes/commands/errors here not screenshot – Mostafa Ahangarha Mar 21 '16 at 09:59

2 Answers2

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.

Eofla
  • 189
  • 15