2

I have installed Java 8 on my PC and programs are getting compiled.

When i try to execute it using cmd prompt it is showing me the following error:

"The system cannot find the file C:\ProgramData\Oracle\Java\javapath\java.exe."

Please help me.

5
  • 1
    Is there really a folder named javapath in your C:\ProgramData\Oracle\Java folder? Commented May 5, 2016 at 7:57
  • 1
    There is on my PC. I guess this must be a new thing - Not like the good old days of "C:\Program Files\Java\jre1.8.0_20\bin" Commented May 5, 2016 at 8:00
  • @Adamski Huh? That's odd, I'll have to make note of that. When I read it, it seems redundant or misplaced, like it should be C:\ProgramData\Oracle\javapath\Java. And why not C:\ProgramData\Oracle\Java\pathtojava? Commented May 5, 2016 at 8:04
  • How are you executing it on cmd , please include full command in question Commented May 5, 2016 at 8:05
  • Sounds like your JRE installation is broken. Try reinstalling the JRE and/or the Java plugin. Commented May 5, 2016 at 8:29

1 Answer 1

2

Try checking your PATH environment variable to ensure it includes: C:\ProgramData\Oracle\Java\javapath

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.