My question is very simple but I still cannot find out what’s the problem.
When I input java
, java -version
or javac -version
in a command prompt nothing is shown at all: neither an “unknown file” error nor the result.
That’s how it looks like:
I used standard Java installer, PATH and JAVA_HOME variables were renewed. I’ve set JDKs several times before but it’s the first time I run into such a problem. Is there anything I am missing or is it a known bug?
Advertisement
Answer
I have seen this occasionally on Windows, and uninstalling all Java distributions (those with an installer) and reinstalling the one you need usually fixes it for me.
If you do a lot of Java development you may need to have several versions of Java available on your system to be sure that everything is compatible for a given project. In that case, ZIP distributions that just need to be unpacked and not installed are very handy, especially with a good IDE that just needs to be told where to find them.