3

Today the program could not run in Windows Server 2008 r2. And when I run java.exe in windows cmd, I got nothing output, just like the img, java.exe not working, javac is workding, I rename java.exe to c2.exe , then c2.exe is working.

Is there any suggestion?

No output Java in path

4
  • Check your PATH so you know for sure which file is executed. Commented Dec 21, 2018 at 10:26
  • 1
    additionally, where java will tell you the locations of all the programs named java on your path. Commented Dec 21, 2018 at 10:36
  • check you have java.bat file in the path ,particularly E:\. It can be simulated if you have java.bat Commented Dec 21, 2018 at 10:48
  • I rename all of the the java.exe. At last I rename C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe to c3.exe,then I can't find java in path. After that c3.exe is working, rename c3.exe to java.exe, it failed again. Commented Dec 21, 2018 at 11:48

1 Answer 1

2
  1. Open windows search and type in "Edit the System Environment Variables", or just "environment".

  2. Under the advanced tab, click on the "Environment Variables" button.

  3. In the top portion of the dialog, scroll down until you see "Path", and click on edit.

  4. Look for whatever directory your java path is pointed to and click delete.

  5. Click "new", then click browse, and locate the java.exe file. Make sure you don't change the original file name.

  6. If this doesn't work, uninstall java and get the latest version for your system from the oracle website, and add the install location to the system path as described in the previous steps.

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.