Could not find Java jdk in a directory that has been renamedHow to set the JDK for Android Studio?Specifying...

Sundering Titan and basic normal lands and snow lands

Replacing tantalum capacitor with ceramic capacitor for Op Amps

“I had a flat in the centre of town, but I didn’t like living there, so …”

Was it really inappropriate to write a pull request for the company I interviewed with?

Should I use HTTPS on a domain that will only be used for redirection?

I've given my players a lot of magic items. Is it reasonable for me to give them harder encounters?

What is "desert glass" and what does it do to the PCs?

Is being socially reclusive okay for a graduate student?

Rationale to prefer local variables over instance variables?

Why aren't there more gauls like Obelix?

What is a term for a function that when called repeatedly, has the same effect as calling once?

What is the oldest European royal house?

What is the purpose of a disclaimer like "this is not legal advice"?

Should we avoid writing fiction about historical events without extensive research?

Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?

Iron deposits mined from under the city

Why doesn't "adolescent" take any articles in "listen to adolescent agonising"?

Why won't the strings command stop?

Quitting employee has privileged access to critical information

Dukha vs legitimate need

Can a space-faring robot still function over a billion years?

Can a Mimic (container form) actually hold loot?

PTiJ: How should animals pray?

Does the US political system, in principle, allow for a no-party system?



Could not find Java jdk in a directory that has been renamed


How to set the JDK for Android Studio?Specifying JDK in eclipse.ini not being usedUnable to set JAVA_HOME to jdkAndroid Studio jdk location problem?Can't find JDK for Unity3d developmentOracle Java JDK InstallationUnable to install Oracle Java JDKAndroid Studio 2.2 frequently crashes on Ubuntu 16.04Why one of applications thinks that JAVA_HOME is set to openjdk 9 directory? [Not actual anymore]Completely remove Java 9 from Ubuntu 17.10













0















I am trying to built a React Native app using Ubuntu 16.04. When I try to run npm run android in the terminal I get this error ERROR: JAVA_HOME is set to an invalid directory: /home/duong/git/Java/jdk1.8.0_144



The weird thing is that I have renamed my "git" folder to "admin" a while ago, and I also have deleted the Java directory in there also. How come npm sees the folder and not me? So now I don't know where the Java jdk is in my system. How can I retrieve the Java folder and set it to default location?










share|improve this question


















  • 1





    Presumably you originally set JAVA_HOME to /home/duong/git/Java/jdk1.8.0_144 in one of your shell initialization files (such as ~/.bashrc) and forgot to change it when you renamed the directory?

    – steeldriver
    Jun 22 '18 at 1:01











  • Yeah so I edited the bashrc file to a new path. When I run 'echo $JAVA_HOME' I get the output '/usr/lib/jvm/java-8-oracle'. But when I typed just '$JAVA_HOME' I get this error instead.. 'bash: /usr/lib/jvm/java-8-oracle: No such file or directory '

    – dennievn
    Jun 23 '18 at 14:56











  • Well JAVA_HOME won't be an executable file, it will be a directory - unfortunately I can't tell you where you installed it, you will need to figure that out yourself

    – steeldriver
    Jun 23 '18 at 15:08
















0















I am trying to built a React Native app using Ubuntu 16.04. When I try to run npm run android in the terminal I get this error ERROR: JAVA_HOME is set to an invalid directory: /home/duong/git/Java/jdk1.8.0_144



The weird thing is that I have renamed my "git" folder to "admin" a while ago, and I also have deleted the Java directory in there also. How come npm sees the folder and not me? So now I don't know where the Java jdk is in my system. How can I retrieve the Java folder and set it to default location?










share|improve this question


















  • 1





    Presumably you originally set JAVA_HOME to /home/duong/git/Java/jdk1.8.0_144 in one of your shell initialization files (such as ~/.bashrc) and forgot to change it when you renamed the directory?

    – steeldriver
    Jun 22 '18 at 1:01











  • Yeah so I edited the bashrc file to a new path. When I run 'echo $JAVA_HOME' I get the output '/usr/lib/jvm/java-8-oracle'. But when I typed just '$JAVA_HOME' I get this error instead.. 'bash: /usr/lib/jvm/java-8-oracle: No such file or directory '

    – dennievn
    Jun 23 '18 at 14:56











  • Well JAVA_HOME won't be an executable file, it will be a directory - unfortunately I can't tell you where you installed it, you will need to figure that out yourself

    – steeldriver
    Jun 23 '18 at 15:08














0












0








0








I am trying to built a React Native app using Ubuntu 16.04. When I try to run npm run android in the terminal I get this error ERROR: JAVA_HOME is set to an invalid directory: /home/duong/git/Java/jdk1.8.0_144



The weird thing is that I have renamed my "git" folder to "admin" a while ago, and I also have deleted the Java directory in there also. How come npm sees the folder and not me? So now I don't know where the Java jdk is in my system. How can I retrieve the Java folder and set it to default location?










share|improve this question














I am trying to built a React Native app using Ubuntu 16.04. When I try to run npm run android in the terminal I get this error ERROR: JAVA_HOME is set to an invalid directory: /home/duong/git/Java/jdk1.8.0_144



The weird thing is that I have renamed my "git" folder to "admin" a while ago, and I also have deleted the Java directory in there also. How come npm sees the folder and not me? So now I don't know where the Java jdk is in my system. How can I retrieve the Java folder and set it to default location?







16.04 java jdk android-studio npm






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 22 '18 at 0:55









dennievndennievn

1




1








  • 1





    Presumably you originally set JAVA_HOME to /home/duong/git/Java/jdk1.8.0_144 in one of your shell initialization files (such as ~/.bashrc) and forgot to change it when you renamed the directory?

    – steeldriver
    Jun 22 '18 at 1:01











  • Yeah so I edited the bashrc file to a new path. When I run 'echo $JAVA_HOME' I get the output '/usr/lib/jvm/java-8-oracle'. But when I typed just '$JAVA_HOME' I get this error instead.. 'bash: /usr/lib/jvm/java-8-oracle: No such file or directory '

    – dennievn
    Jun 23 '18 at 14:56











  • Well JAVA_HOME won't be an executable file, it will be a directory - unfortunately I can't tell you where you installed it, you will need to figure that out yourself

    – steeldriver
    Jun 23 '18 at 15:08














  • 1





    Presumably you originally set JAVA_HOME to /home/duong/git/Java/jdk1.8.0_144 in one of your shell initialization files (such as ~/.bashrc) and forgot to change it when you renamed the directory?

    – steeldriver
    Jun 22 '18 at 1:01











  • Yeah so I edited the bashrc file to a new path. When I run 'echo $JAVA_HOME' I get the output '/usr/lib/jvm/java-8-oracle'. But when I typed just '$JAVA_HOME' I get this error instead.. 'bash: /usr/lib/jvm/java-8-oracle: No such file or directory '

    – dennievn
    Jun 23 '18 at 14:56











  • Well JAVA_HOME won't be an executable file, it will be a directory - unfortunately I can't tell you where you installed it, you will need to figure that out yourself

    – steeldriver
    Jun 23 '18 at 15:08








1




1





Presumably you originally set JAVA_HOME to /home/duong/git/Java/jdk1.8.0_144 in one of your shell initialization files (such as ~/.bashrc) and forgot to change it when you renamed the directory?

– steeldriver
Jun 22 '18 at 1:01





Presumably you originally set JAVA_HOME to /home/duong/git/Java/jdk1.8.0_144 in one of your shell initialization files (such as ~/.bashrc) and forgot to change it when you renamed the directory?

– steeldriver
Jun 22 '18 at 1:01













Yeah so I edited the bashrc file to a new path. When I run 'echo $JAVA_HOME' I get the output '/usr/lib/jvm/java-8-oracle'. But when I typed just '$JAVA_HOME' I get this error instead.. 'bash: /usr/lib/jvm/java-8-oracle: No such file or directory '

– dennievn
Jun 23 '18 at 14:56





Yeah so I edited the bashrc file to a new path. When I run 'echo $JAVA_HOME' I get the output '/usr/lib/jvm/java-8-oracle'. But when I typed just '$JAVA_HOME' I get this error instead.. 'bash: /usr/lib/jvm/java-8-oracle: No such file or directory '

– dennievn
Jun 23 '18 at 14:56













Well JAVA_HOME won't be an executable file, it will be a directory - unfortunately I can't tell you where you installed it, you will need to figure that out yourself

– steeldriver
Jun 23 '18 at 15:08





Well JAVA_HOME won't be an executable file, it will be a directory - unfortunately I can't tell you where you installed it, you will need to figure that out yourself

– steeldriver
Jun 23 '18 at 15:08










1 Answer
1






active

oldest

votes


















0














I've encountered this problem on my Ubuntu 18.04 and this link helped me out.



http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/



:D






share|improve this answer








New contributor




J.John is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















    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%2f1048698%2fcould-not-find-java-jdk-in-a-directory-that-has-been-renamed%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









    0














    I've encountered this problem on my Ubuntu 18.04 and this link helped me out.



    http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/



    :D






    share|improve this answer








    New contributor




    J.John is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      0














      I've encountered this problem on my Ubuntu 18.04 and this link helped me out.



      http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/



      :D






      share|improve this answer








      New contributor




      J.John is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        0












        0








        0







        I've encountered this problem on my Ubuntu 18.04 and this link helped me out.



        http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/



        :D






        share|improve this answer








        New contributor




        J.John is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        I've encountered this problem on my Ubuntu 18.04 and this link helped me out.



        http://tipsonubuntu.com/2016/07/31/install-oracle-java-8-9-ubuntu-16-04-linux-mint-18/



        :D







        share|improve this answer








        New contributor




        J.John is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        share|improve this answer



        share|improve this answer






        New contributor




        J.John is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 11 mins ago









        J.JohnJ.John

        1




        1




        New contributor




        J.John is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        J.John is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        J.John is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























            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%2f1048698%2fcould-not-find-java-jdk-in-a-directory-that-has-been-renamed%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

            Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

            Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

            Should I use Docker or LXD?How to cache (more) data on SSD/RAM to avoid spin up?Unable to get Windows File...