Error could not find libjava.so when running java binary












0















I uninstalled jdk 1.8 and installed JDK 1.7 on my ubuntu but when I am trying to run java ,I am getting the following Error:



sana@sana:~$ java -version
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.









share|improve this question

























  • Make sure jdk1.7 bin directory is in your path echo $PATH

    – storm
    Dec 12 '18 at 12:39











  • I believe jdk1.7 isn't supported anymore. What is the output of which java and which javac?

    – Kulfy
    Dec 12 '18 at 12:40













  • sana@sana:~$ echo $PATH /opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jre1.7.0_45/bin:/usr/local/java/jdk1.7.0_45/bin

    – sana
    Dec 12 '18 at 12:50













  • sana@sana:~$ which java /usr/bin/java

    – sana
    Dec 12 '18 at 12:54











  • sana@sana:~$ which javac /usr/bin/javac

    – sana
    Dec 12 '18 at 12:54
















0















I uninstalled jdk 1.8 and installed JDK 1.7 on my ubuntu but when I am trying to run java ,I am getting the following Error:



sana@sana:~$ java -version
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.









share|improve this question

























  • Make sure jdk1.7 bin directory is in your path echo $PATH

    – storm
    Dec 12 '18 at 12:39











  • I believe jdk1.7 isn't supported anymore. What is the output of which java and which javac?

    – Kulfy
    Dec 12 '18 at 12:40













  • sana@sana:~$ echo $PATH /opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jre1.7.0_45/bin:/usr/local/java/jdk1.7.0_45/bin

    – sana
    Dec 12 '18 at 12:50













  • sana@sana:~$ which java /usr/bin/java

    – sana
    Dec 12 '18 at 12:54











  • sana@sana:~$ which javac /usr/bin/javac

    – sana
    Dec 12 '18 at 12:54














0












0








0








I uninstalled jdk 1.8 and installed JDK 1.7 on my ubuntu but when I am trying to run java ,I am getting the following Error:



sana@sana:~$ java -version
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.









share|improve this question
















I uninstalled jdk 1.8 and installed JDK 1.7 on my ubuntu but when I am trying to run java ,I am getting the following Error:



sana@sana:~$ java -version
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.






java






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 12 '18 at 13:07







sana

















asked Dec 12 '18 at 12:32









sanasana

981110




981110













  • Make sure jdk1.7 bin directory is in your path echo $PATH

    – storm
    Dec 12 '18 at 12:39











  • I believe jdk1.7 isn't supported anymore. What is the output of which java and which javac?

    – Kulfy
    Dec 12 '18 at 12:40













  • sana@sana:~$ echo $PATH /opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jre1.7.0_45/bin:/usr/local/java/jdk1.7.0_45/bin

    – sana
    Dec 12 '18 at 12:50













  • sana@sana:~$ which java /usr/bin/java

    – sana
    Dec 12 '18 at 12:54











  • sana@sana:~$ which javac /usr/bin/javac

    – sana
    Dec 12 '18 at 12:54



















  • Make sure jdk1.7 bin directory is in your path echo $PATH

    – storm
    Dec 12 '18 at 12:39











  • I believe jdk1.7 isn't supported anymore. What is the output of which java and which javac?

    – Kulfy
    Dec 12 '18 at 12:40













  • sana@sana:~$ echo $PATH /opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jre1.7.0_45/bin:/usr/local/java/jdk1.7.0_45/bin

    – sana
    Dec 12 '18 at 12:50













  • sana@sana:~$ which java /usr/bin/java

    – sana
    Dec 12 '18 at 12:54











  • sana@sana:~$ which javac /usr/bin/javac

    – sana
    Dec 12 '18 at 12:54

















Make sure jdk1.7 bin directory is in your path echo $PATH

– storm
Dec 12 '18 at 12:39





Make sure jdk1.7 bin directory is in your path echo $PATH

– storm
Dec 12 '18 at 12:39













I believe jdk1.7 isn't supported anymore. What is the output of which java and which javac?

– Kulfy
Dec 12 '18 at 12:40







I believe jdk1.7 isn't supported anymore. What is the output of which java and which javac?

– Kulfy
Dec 12 '18 at 12:40















sana@sana:~$ echo $PATH /opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jre1.7.0_45/bin:/usr/local/java/jdk1.7.0_45/bin

– sana
Dec 12 '18 at 12:50







sana@sana:~$ echo $PATH /opt/maven/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/java/jre1.7.0_45/bin:/usr/local/java/jdk1.7.0_45/bin

– sana
Dec 12 '18 at 12:50















sana@sana:~$ which java /usr/bin/java

– sana
Dec 12 '18 at 12:54





sana@sana:~$ which java /usr/bin/java

– sana
Dec 12 '18 at 12:54













sana@sana:~$ which javac /usr/bin/javac

– sana
Dec 12 '18 at 12:54





sana@sana:~$ which javac /usr/bin/javac

– sana
Dec 12 '18 at 12:54










1 Answer
1






active

oldest

votes


















-1














Try rebooting your computer after installing it and try again.



Or you could have a problem similar to this one: https://stackoverflow.com/questions/25954348/error-could-not-find-libjava-so-error-could-not-find-java-2-runtime-environme



One of the poster mentions he has 2 versions installed: "I encounter this issue before. It turns out there are 2 javac program sitting on my machine. They are in /usr/bin/javac and /bin/javac. My system used the /bin/javac one. The right path for me is /usr/bin/javac. Removing /bin/javac helped"






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',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    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%2f1100308%2ferror-could-not-find-libjava-so-when-running-java-binary%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    -1














    Try rebooting your computer after installing it and try again.



    Or you could have a problem similar to this one: https://stackoverflow.com/questions/25954348/error-could-not-find-libjava-so-error-could-not-find-java-2-runtime-environme



    One of the poster mentions he has 2 versions installed: "I encounter this issue before. It turns out there are 2 javac program sitting on my machine. They are in /usr/bin/javac and /bin/javac. My system used the /bin/javac one. The right path for me is /usr/bin/javac. Removing /bin/javac helped"






    share|improve this answer






























      -1














      Try rebooting your computer after installing it and try again.



      Or you could have a problem similar to this one: https://stackoverflow.com/questions/25954348/error-could-not-find-libjava-so-error-could-not-find-java-2-runtime-environme



      One of the poster mentions he has 2 versions installed: "I encounter this issue before. It turns out there are 2 javac program sitting on my machine. They are in /usr/bin/javac and /bin/javac. My system used the /bin/javac one. The right path for me is /usr/bin/javac. Removing /bin/javac helped"






      share|improve this answer




























        -1












        -1








        -1







        Try rebooting your computer after installing it and try again.



        Or you could have a problem similar to this one: https://stackoverflow.com/questions/25954348/error-could-not-find-libjava-so-error-could-not-find-java-2-runtime-environme



        One of the poster mentions he has 2 versions installed: "I encounter this issue before. It turns out there are 2 javac program sitting on my machine. They are in /usr/bin/javac and /bin/javac. My system used the /bin/javac one. The right path for me is /usr/bin/javac. Removing /bin/javac helped"






        share|improve this answer















        Try rebooting your computer after installing it and try again.



        Or you could have a problem similar to this one: https://stackoverflow.com/questions/25954348/error-could-not-find-libjava-so-error-could-not-find-java-2-runtime-environme



        One of the poster mentions he has 2 versions installed: "I encounter this issue before. It turns out there are 2 javac program sitting on my machine. They are in /usr/bin/javac and /bin/javac. My system used the /bin/javac one. The right path for me is /usr/bin/javac. Removing /bin/javac helped"







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 12 '18 at 18:18

























        answered Dec 12 '18 at 12:39









        KevinKevin

        1474




        1474






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1100308%2ferror-could-not-find-libjava-so-when-running-java-binary%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

            How to change which sound is reproduced for terminal bell?

            Can I use Tabulator js library in my java Spring + Thymeleaf project?