Cannot find a JRE or JDK. Please set JAVA_HOME to a >=<version>

Problem

Trying to install a MySQL database driver and receiving the error:

Cannot find a JRE or JDK. Please set JAVA_HOME to a >=<version>

Solution

 If this is encountered,

  1. Ensure java has been installed and is running.
  2. Check to see if the correct java version is being used.
  3. Check you have run the command: 
    export JAVA_HOME=/usr/lib/jvm/jdk1.7.0/jre

This should be added to your ~/.bashrc profile. Please take note that the profile file and the Java path may be different for the your system. 

Comments

  • Avatar
    Lot Navarro

    It must to be apply to the datameer user