title: JDK path for Android Studio on Linux
body: <p>I am running Manjaro 17.0.1</p>
  
  <p>I have an issue running <strong>android studio</strong>.</p>
  
  <p>When I run <strong>./studio.sh</strong> I have:</p>
  
  <ul>
  <li><strong>A graphical error message from Android Studio saying</strong> </li>
  </ul>
  
  <p><em>No JDK found. Please validate either STUDIO_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation</em></p>
  
  <ul>
  <li><p><strong>A console error message</strong> </p>
  
  <blockquote>
    <p>which: no java in (/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)<br>
        /usr/bin/dirname: missing operand<br>
        Try '/usr/bin/dirname --help' for more information.<br>
        /usr/bin/dirname: missing operand<br>
        Try '/usr/bin/dirname --help' for more information.<br>
        Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.</p>
  </blockquote></li>
  </ul>
  
  <p><strong>-------------------------------------------------------------------</strong></p>
  
  <p>I have a directory named /Android in which I have both android studio installation directory and jdk1.8.0_151 directory. I then set <strong>JAVA_HOME</strong> to  point to the jdk directory (/home/myuser/android/jdk1.8.0_151).</p>
  
  <p>I tried to run again android studio and now i get another error message saying</p>
  
  <blockquote>
    <p><em>./studio.sh: line 207: /home/joub/android/jdk1.8.0_151/bin/java: cannot execute binary file: Exec format error</em></p>
  </blockquote>
  
  <p><strong><em>EDIT</em></strong></p>
  
  <p><strong><em>I can not put the jdk directory into /usr/java because i do not have any free space on my disk. This is why I created a new partition and mounted it to /android so I can install both android-studio and JDK inside that directory.</em></strong></p>