Reputation: 54084
I am confused here:
If I run java
from cmd
then the command runs succesfully.
But I have neither set JAVA_HOME
nor %JRE_HOME%
nor added java/jre installation directory in my PATH
.
So when I do
echo %JAVA_HOME%
No JAVA_HOME is displayed (expected since I have not set it)
If I do:
echo %JRE_HOME%`
No JRE_HOME is displayed (expected since I have not set it)
and when I do
echo %PATH%
no directory in the PATH points to a java installation. Expected since I have not modified PATH to add java.
PATH is:
C:\Program Files\Common Files\Microsoft Shared\Windows Live;
C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;
C:\Program Files (x86)\AMD APP\bin\x86_64;
C:\Program Files (x86)\AMD APP\bin\x86;
C:\Windows\system32;C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;
C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;
C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;
C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;
C:\Program Files (x86)\IDM Computer Solutions\UltraEdit-32;
C:\Program Files (x86)\Windows Live\Shared
So why don't I get Bad Command
on running java?
Upvotes: 1
Views: 183
Reputation: 9651
According to this answer to "Is there an equivalent of 'which' on windows?", recent versions of Windows include a 'where' command.
So you could try: where java.exe
I can't check right now, but I have a feeling Windows had a java.exe somewhere under C:\Windows\System32\
…
Upvotes: 9