title: Jenkins not recognizing my java in linux
body: <p>I am using OpenSuse and trying to install Jenkins using rpm. I have many trouble in this: </p>
  
  <pre><code>aquarius:/home/jeevan/Downloads # service jenkins start
  Job for jenkins.service failed. See 'systemctl status jenkins.service' and 'journalctl -xn' for details.
  </code></pre>
  
  <p>The problem is clearly stated in Jenkins <a href="https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Red+Hat+distributions" rel="nofollow">website</a> as a Java problem. </p>
  
  <p>But I have already installed java in my machine by downloading from oracle website and configured the "update-alternatives"</p>
  
  <pre><code>aquarius:/usr/lib/jenkins # java -version
  java version "1.8.0_25"
  Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
  Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
  aquarius:/usr/lib/jenkins # javac -version
  javac 1.8.0_25
  aquarius:/usr/lib/jenkins # whereis java
  java: /usr/bin/java /usr/lib64/java /etc/java /usr/share/java
  aquarius:/usr/lib/jenkins # echo $JAVA_HOME
  /usr/java/latest
  aquarius:/usr/lib/jenkins # update-alternatives --config java
  There are 3 choices for the alternative java (providing /usr/bin/java).
  
    Selection    Path                                       Priority   Status
  ------------------------------------------------------------
    0            /usr/lib64/jvm/jre-1.7.0-openjdk/bin/java   17147     auto mode
  * 1            /usr/java/jdk1.8.0_25/bin/java              1         manual mode
    2            /usr/lib64/jvm/jre-1.5.0-gcj/bin/java       1500      manual mode
    3            /usr/lib64/jvm/jre-1.7.0-openjdk/bin/java   17147     manual mode
  
  Press enter to keep the current choice[*], or type selection number: 1
  aquarius:/usr/lib/jenkins # update-alternatives --config javac
  There are 2 choices for the alternative javac (providing /usr/bin/javac).
  
    Selection    Path                                     Priority   Status
  ------------------------------------------------------------
    0            /usr/lib64/jvm/java-1.5.0-gcj/bin/javac   1500      auto mode
  * 1            /usr/java/jdk1.8.0_25/bin/javac           1         manual mode
    2            /usr/lib64/jvm/java-1.5.0-gcj/bin/javac   1500      manual mode
  
  Press enter to keep the current choice[*], or type selection number: 1
  aquarius:/usr/lib/jenkins # ls
  jenkins.war                                                                                                                                                                                     
  aquarius:/usr/lib/jenkins # whereis jenkins                                                                                                                                                     
  jenkins: /usr/lib/jenkins                                                                                                                                                                       
  aquarius:/usr/lib/jenkins # 
  </code></pre>
  
  <p>Can some one please provide me a solution.</p>