1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved Java not found in command prompt

Discussion in 'Software Development' started by Darrylt2016, Jul 10, 2018.

Thread Status:
Not open for further replies.
Advertisement
  1. Darrylt2016

    Darrylt2016 Thread Starter

    Joined:
    May 5, 2018
    Messages:
    101
    Hello dckeks,

    I reinstalled Java on my computer and now it will not work in command prompt.

    I tried to correct the path in environment variable but no luck. Can you help?

    I added some photos to show what might be the problem.

    Thanks, Darryl
     

    Attached Files:

  2. managed

    managed Trusted Advisor Spam Fighter

    Joined:
    May 24, 2003
    Messages:
    10,684
    First Name:
    Allan
    There is no such thing as javac, try java instead, you should get a help list about the command options.
     
  3. Darrylt2016

    Darrylt2016 Thread Starter

    Joined:
    May 5, 2018
    Messages:
    101
    okay, I tried java this time and got this.

    check the screenshot.
     

    Attached Files:

  4. managed

    managed Trusted Advisor Spam Fighter

    Joined:
    May 24, 2003
    Messages:
    10,684
    First Name:
    Allan
    You need to add the path to the java.exe file onto the Path system variable. In the Environment Variables window click on Path in the lower area > Edit > New, then type the path to java.exe (probably C:\Program Files\jre-10.0.1\bin\) and OK out.

    To run java you may have to use an administrator command prompt, if so type CMD into the taskbar search area then right click on Command prompt at the top and select Run as Administrator.

    What are you trying to do with java ?
     
  5. Darrylt2016

    Darrylt2016 Thread Starter

    Joined:
    May 5, 2018
    Messages:
    101
    okay, I will try it and see what happens.

    I also downloaded Eclipse and maybe that link is broken

    I learn Java programming at Sololearn I know the basic and to build on it.

    Alright, I tried that and it did not work.

    last time I added jdk bin and jrk bin together separating them with semicolon on the same path and that work.

    Then I type in javac in cmd and it work.

    Shoud I type in jdk and jrk?
     

    Attached Files:

    Last edited: Jul 10, 2018
  6. managed

    managed Trusted Advisor Spam Fighter

    Joined:
    May 24, 2003
    Messages:
    10,684
    First Name:
    Allan
    Yes try that, you need the path to the java.exe and/or javac.exe files, I am working in Windows 7 so your paths and filenames may be different in Windows 10.
     
  7. Darrylt2016

    Darrylt2016 Thread Starter

    Joined:
    May 5, 2018
    Messages:
    101
    yeah, maybe some different between 7 and 10.

    I tried that and it did not work.

    what if I click edit instead of new where the path is high lighted in bluc.

    and enter jdk and jre there. Would that work?
     

    Attached Files:

  8. managed

    managed Trusted Advisor Spam Fighter

    Joined:
    May 24, 2003
    Messages:
    10,684
    First Name:
    Allan
    Edit will let you alter the highlighted line, New let's you type a new line in.

    In File Explorer do a search for java.exe and/or javac.exe then add the path(s) to the path command.
     
  9. Darrylt2016

    Darrylt2016 Thread Starter

    Joined:
    May 5, 2018
    Messages:
    101
    Where is file explorer and how do I use that?

    Okay, I don't know if I done it right but I uploaded a screenshot.
     

    Attached Files:

    Last edited: Jul 10, 2018
  10. managed

    managed Trusted Advisor Spam Fighter

    Joined:
    May 24, 2003
    Messages:
    10,684
    First Name:
    Allan
    Click the folder icon on the taskbar to open File Explorer. It 's My Computer/Windows Explorer renamed for Windows 10. Then type your search item at the top right of it's window.
     
  11. Darrylt2016

    Darrylt2016 Thread Starter

    Joined:
    May 5, 2018
    Messages:
    101
    okay, I did not see your answer above.

    I will upload a photo here
     

    Attached Files:

  12. managed

    managed Trusted Advisor Spam Fighter

    Joined:
    May 24, 2003
    Messages:
    10,684
    First Name:
    Allan
    Add C:\Program Files\Java\jdk-10.0.1\bin\ into the path then javac should work in the Command prompt window.
     
  13. Darrylt2016

    Darrylt2016 Thread Starter

    Joined:
    May 5, 2018
    Messages:
    101
    yeah, that did it.

    I also download NetBean IDE . I tried to open it but got this message. see file.

    Should I reinstall NetBean IDE ?
     

    Attached Files:

  14. Darrylt2016

    Darrylt2016 Thread Starter

    Joined:
    May 5, 2018
    Messages:
    101
    Hello,

    Will you help me get netbean ide working again.

    I tried opening netbean and got this message : Invalid jdk home specified

    Cannot locate java installation in specified jdkhome
    C:/Program Files\Java\jdk 1.8.0_171
    Do you want to try t0 use default version?

    Click on yes and got a message; Cannot find java 1.8 or higher.

    Darryl
     
  15. managed

    managed Trusted Advisor Spam Fighter

    Joined:
    May 24, 2003
    Messages:
    10,684
    First Name:
    Allan
    Looks like you have to tell Netbean where to look for jdk so try to enter the correct path into Netbean.
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1212696

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice