The "java is not recognized as an internal or extenal command." is a fairly common problem. Note that I am not looking for a solution to this. If someone came here for such a solution, it can be found here and on other threads.
My issue is, rather, as follows:
When I install java on a Windows 7 computer without changing the default installation path, java is automatically recognized by CMD. No problem there. I've done this in both, x86 and x64, and across several versions (Starter to Ultimate). However, it has come to my attention, that when I install java on a Windows 8.1 machine, the aforementioned problem is prompted when I try to run a batch file that serves as a "shortcut" to a jar file I created (java -jar ".\a\b\foo.jar") which does run smoothly on Windows 7.
What I am asking here is: why does this happen? Furthermore, is there a certain way I could install java so as to avoid having to modify my PATH variable or tweaking around Windows configuration? I would like to prevent such inconveniences on every Windows 8 & 8.1 machine on which I have to install java.