Hello there, bogdan98nitu
This error happens due to the fact that the PATH
of your java installation is not set in your system's environment variables.
You need to add your Java's installation path
into your system variables
following these steps:-
1) Open the System Properties box
by pressing win key/start,
type in sysdm.cpl, right click on the entry that appears and select run as administrator
2) Select the Advanced tab
at the top of the box.
3) Click on Environment Variables
4) Next, head to the Path entry of your System variables box, select it, and press Edit
until you find it; alternatively
if you're the only user on the machine, you can perform these steps at the Path entry of your User variables box
5) In the box that pops up, type in the full path of the location of your Java installation (e.g. C:\Program Files\Java)
, at the very end of the other variables by adding the ; symbol
to the last entry present and following it up with your own.
In this example I'm adding some tools used by the Windows Performance Toolkit
installed in the folder D:\Apps\WPT x64
to the path, notice the ; symbol
after the previous entry.
DO NOT delete any of the other variables.
6) Press OK, and OK again on the next box and another OK to the final box
The path of the java installation should be recognised and you shouldn't encounter that issue again
Hope that helps.