Change java version from 1.8.0_161 to 1.8.0_151 Ubuntu 16.04

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I am using ubuntu 16.04 LTS.



...$ java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

...$ echo $JAVA_HOME
/usr/lib/jvm/java-8-oracle


I have tried to use multiple versions of java using the answer mentioned is this post.



...$ which java
/usr/bin/java


Downloaded jdk 1.8.0_151 from this link:



http://www.oracle.com/technetwork/java/archive-139210.html



Extracted it in home/b/ then tried the following command as mentioned in the post.



...$ export PATH=/home/b/jdk1.8.0_151/bin:$PATH 

... $ which java
/usr/bin/java


I am still getting the same java.



I have also tried:



...$ sudo update-alternatives --config java

here is 1 choice for the alternative java (providing /usr/bin/java).

Selection Path Priority Status

------------------------------------------------------------
0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1081 auto mode
* 1 /usr/lib/jvm/java-8-oracle/jre/bin/java 1081 manual mode


This is my $PATH:



...$ echo $PATH

/home/b/jdk1.8.0_151/bin:/home/junaid/anaconda2/bin:/usr/local/sbin:/usr/local/bin:
/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:
/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin


Should I remove Java and download again? If yes, then how?










share|improve this question



























    up vote
    0
    down vote

    favorite












    I am using ubuntu 16.04 LTS.



    ...$ java -version
    java version "1.8.0_161"
    Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
    Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

    ...$ echo $JAVA_HOME
    /usr/lib/jvm/java-8-oracle


    I have tried to use multiple versions of java using the answer mentioned is this post.



    ...$ which java
    /usr/bin/java


    Downloaded jdk 1.8.0_151 from this link:



    http://www.oracle.com/technetwork/java/archive-139210.html



    Extracted it in home/b/ then tried the following command as mentioned in the post.



    ...$ export PATH=/home/b/jdk1.8.0_151/bin:$PATH 

    ... $ which java
    /usr/bin/java


    I am still getting the same java.



    I have also tried:



    ...$ sudo update-alternatives --config java

    here is 1 choice for the alternative java (providing /usr/bin/java).

    Selection Path Priority Status

    ------------------------------------------------------------
    0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1081 auto mode
    * 1 /usr/lib/jvm/java-8-oracle/jre/bin/java 1081 manual mode


    This is my $PATH:



    ...$ echo $PATH

    /home/b/jdk1.8.0_151/bin:/home/junaid/anaconda2/bin:/usr/local/sbin:/usr/local/bin:
    /usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:
    /usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin


    Should I remove Java and download again? If yes, then how?










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I am using ubuntu 16.04 LTS.



      ...$ java -version
      java version "1.8.0_161"
      Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

      ...$ echo $JAVA_HOME
      /usr/lib/jvm/java-8-oracle


      I have tried to use multiple versions of java using the answer mentioned is this post.



      ...$ which java
      /usr/bin/java


      Downloaded jdk 1.8.0_151 from this link:



      http://www.oracle.com/technetwork/java/archive-139210.html



      Extracted it in home/b/ then tried the following command as mentioned in the post.



      ...$ export PATH=/home/b/jdk1.8.0_151/bin:$PATH 

      ... $ which java
      /usr/bin/java


      I am still getting the same java.



      I have also tried:



      ...$ sudo update-alternatives --config java

      here is 1 choice for the alternative java (providing /usr/bin/java).

      Selection Path Priority Status

      ------------------------------------------------------------
      0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1081 auto mode
      * 1 /usr/lib/jvm/java-8-oracle/jre/bin/java 1081 manual mode


      This is my $PATH:



      ...$ echo $PATH

      /home/b/jdk1.8.0_151/bin:/home/junaid/anaconda2/bin:/usr/local/sbin:/usr/local/bin:
      /usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:
      /usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin


      Should I remove Java and download again? If yes, then how?










      share|improve this question















      I am using ubuntu 16.04 LTS.



      ...$ java -version
      java version "1.8.0_161"
      Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

      ...$ echo $JAVA_HOME
      /usr/lib/jvm/java-8-oracle


      I have tried to use multiple versions of java using the answer mentioned is this post.



      ...$ which java
      /usr/bin/java


      Downloaded jdk 1.8.0_151 from this link:



      http://www.oracle.com/technetwork/java/archive-139210.html



      Extracted it in home/b/ then tried the following command as mentioned in the post.



      ...$ export PATH=/home/b/jdk1.8.0_151/bin:$PATH 

      ... $ which java
      /usr/bin/java


      I am still getting the same java.



      I have also tried:



      ...$ sudo update-alternatives --config java

      here is 1 choice for the alternative java (providing /usr/bin/java).

      Selection Path Priority Status

      ------------------------------------------------------------
      0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1081 auto mode
      * 1 /usr/lib/jvm/java-8-oracle/jre/bin/java 1081 manual mode


      This is my $PATH:



      ...$ echo $PATH

      /home/b/jdk1.8.0_151/bin:/home/junaid/anaconda2/bin:/usr/local/sbin:/usr/local/bin:
      /usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:
      /usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin


      Should I remove Java and download again? If yes, then how?







      java jdk openjdk oracle anaconda






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 9 at 11:22









      Chai T. Rex

      3,79711132




      3,79711132










      asked Feb 9 at 9:57









      el323

      12315




      12315




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          0
          down vote













          I had an issue as follows:



          >Checking build tools versions...
          >************************************************************
          >You asked for an OpenJDK based build but your version is
          >java version "1.8.0_161" Java(TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode).
          >************************************************************
          >build/core/main.mk:175: error: stop.
          >09:36:38 ckati failed with: exit status 1
          >build/core/main.mk:21: recipe for target 'run_soong_ui' failed
          >make: *** [run_soong_ui] Error 1

          >#### make failed to build some targets (01:40 (mm:ss)) ####


          The issue is solved for me by removing Oracle path from $EXPORT.






          share|improve this answer






















            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "89"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1004516%2fchange-java-version-from-1-8-0-161-to-1-8-0-151-ubuntu-16-04%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            0
            down vote













            I had an issue as follows:



            >Checking build tools versions...
            >************************************************************
            >You asked for an OpenJDK based build but your version is
            >java version "1.8.0_161" Java(TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode).
            >************************************************************
            >build/core/main.mk:175: error: stop.
            >09:36:38 ckati failed with: exit status 1
            >build/core/main.mk:21: recipe for target 'run_soong_ui' failed
            >make: *** [run_soong_ui] Error 1

            >#### make failed to build some targets (01:40 (mm:ss)) ####


            The issue is solved for me by removing Oracle path from $EXPORT.






            share|improve this answer


























              up vote
              0
              down vote













              I had an issue as follows:



              >Checking build tools versions...
              >************************************************************
              >You asked for an OpenJDK based build but your version is
              >java version "1.8.0_161" Java(TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode).
              >************************************************************
              >build/core/main.mk:175: error: stop.
              >09:36:38 ckati failed with: exit status 1
              >build/core/main.mk:21: recipe for target 'run_soong_ui' failed
              >make: *** [run_soong_ui] Error 1

              >#### make failed to build some targets (01:40 (mm:ss)) ####


              The issue is solved for me by removing Oracle path from $EXPORT.






              share|improve this answer
























                up vote
                0
                down vote










                up vote
                0
                down vote









                I had an issue as follows:



                >Checking build tools versions...
                >************************************************************
                >You asked for an OpenJDK based build but your version is
                >java version "1.8.0_161" Java(TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode).
                >************************************************************
                >build/core/main.mk:175: error: stop.
                >09:36:38 ckati failed with: exit status 1
                >build/core/main.mk:21: recipe for target 'run_soong_ui' failed
                >make: *** [run_soong_ui] Error 1

                >#### make failed to build some targets (01:40 (mm:ss)) ####


                The issue is solved for me by removing Oracle path from $EXPORT.






                share|improve this answer














                I had an issue as follows:



                >Checking build tools versions...
                >************************************************************
                >You asked for an OpenJDK based build but your version is
                >java version "1.8.0_161" Java(TM) SE Runtime Environment (build 1.8.0_161-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode).
                >************************************************************
                >build/core/main.mk:175: error: stop.
                >09:36:38 ckati failed with: exit status 1
                >build/core/main.mk:21: recipe for target 'run_soong_ui' failed
                >make: *** [run_soong_ui] Error 1

                >#### make failed to build some targets (01:40 (mm:ss)) ####


                The issue is solved for me by removing Oracle path from $EXPORT.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Mar 13 at 5:23

























                answered Mar 13 at 5:17









                Rafeeq Karakkadan

                11




                11



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1004516%2fchange-java-version-from-1-8-0-161-to-1-8-0-151-ubuntu-16-04%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    pylint3 and pip3 broken

                    Missing snmpget and snmpwalk

                    How to enroll fingerprints to Ubuntu 17.10 with VFS491